Title: Put some text in niceditor
Tags: javascript;php;html;nicedit
Question: I got simple script that put some text in textarea:

Javascript

```<script language="javascript" type="text/javascript"&gt;
$(document).ready(function(){
  $("#add").click(function(){
      $('#comment').html('[quote] <?php echo link_to($comment-&gt;user-&gt;username, 'profile/'.$comment-&gt;user-&gt;username); ?&gt; written: <?php echo $comment-&gt;content; ?&gt; [/quote]');
  });
});
</script&gt;
```

HTML

```<textarea id="comment" name="comment"&gt;</textarea&gt;<br /&gt;
```

But it's working just then I turn off ```niceditor```. 

My niceditor code:



``` <script type="text/javascript"&gt;
    //<![CDATA[
            bkLib.onDomLoaded(function() { nicEditors.allTextAreas({buttonList : ['bold','italic','underline','strikeThrough','image','upload','link','unlink']} ) });

        //]]&gt;
 </script&gt;
```



Here is another answer: if you are using only php and nicedit you should place the php code straight inside the  tags

for example 

```<textarea id="comment" name="comment"&gt;<?php echo link_to($comment-&gt;user-&gt;username, 'profile/'.$comment-&gt;user-&gt;username); ?&gt; written: <?php echo $comment-&gt;content; ?&gt;</textarea&gt;
```


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2014:00:03/21/14', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<javascript><php><html><nicedit>', 'Title': 'Put some text in niceditor', 'ViewCount': 220, 'id': 22554086, 'user_AboutMe': '', 'user_AccountId': 3474324.0, 'user_DisplayName': 'Karambyto04', 'user_Reputation': 11.0, 'user_Views': 6.0, 'user_id': 2907938.0}}