title: how to set text in ckeditor
body: <p>How do I set text in CKEditor?  CKEditor also needs to integrate with ckfinder. </p>
  
  <p>I tried doing </p>
  
  <p>// I need to set ckeditor text with a value in code behind. To get that value from code bhind, I am using a div which would be set in code behind. This is not hidden currently but I would do that eventually. I need to set this value to my ckeditor.</p>
  
   
  
  <pre><code>    &lt;textarea id="editor1" name="editor1"&gt;&lt;/textarea&gt;
          &lt;script type="text/javascript"&gt;
              window.onload = function () {
  
                      var edt = CKEDITOR.replace('editor1', { toolbar: 'Basic' });
   CKFinder.setupCKEditor(edt, '/ckfinder/');
  
                      var t = &lt;%=editortext.InnerText %&gt;;
  
  
                      CKEDITOR.instances.editor1.setData(t);
  
              }
  </code></pre>
  
  <p></p>
  
  <p>If I put some static text for t, var t = "Some Text"; </p>
  
  <p>and then set </p>
  
  <p>CKEDITOR.instances.editor1.setData(t); it works fine.</p>
  
  <p>If I use, </p>
  
  <pre><code>var t = &lt;%=editortext.InnerText %&gt;;
  
  
                      CKEDITOR.instances.editor1.setData(t);
  </code></pre>
  
  <p>ckeditor is no longer displayed. Only text area is displayed. How to set text in ckeditor ? Please help</p>