title: update content ckeditor
body: <p>I'm trying to update the content of my ckeditor but it didn't works</p>
  
  <pre><code>&lt;textarea id="monday" class="ckeditor" name="monday" &gt;1&lt;/textarea&gt;
  &lt;script type="text/javascript" &gt;
      setTimeout(function(){
          $('#monday').val('test');
          CKEDITOR.instances.monday.updateElement();
          alert( $('#monday').val());
      },1000)
  &lt;/script&gt;
  </code></pre>
  
  <p>but I always having 1 in my ckeditor and the alert return <p>1</p>
  (1 with p but it didn't appear)</p>
  
  <p>this is CKEditor 4.0</p>
  
  <p>I ever read post about this on but it was an oldest version</p>
  
  <p>Thanks</p>
  
  <p>edit: 2nd test</p>
  
  <pre><code>&lt;script type="text/javascript" &gt;
  setTimeout(function(){
      $('#monday').val('test');
      for ( instance in CKEDITOR.instances )
      {
          CKEDITOR.instances[instance].updateElement();
      }
      alert( $('#monday').val());
  },5000)
  &lt;/script&gt;
  </code></pre>
  
  <p>But it didn't works</p>
  
  <p>Edit 3rd test</p>
  
  <pre><code>&lt;script type="text/javascript" &gt;
  setTimeout(function(){
      $('#monday').val('test');
      $('textarea.ckeditor').each(function () {
      var $textarea = $(this);
      $textarea.val(CKEDITOR.instances[$textarea.attr('name')].getData());
      console.log(CKEDITOR.instances[$textarea.attr('name')].getData());
      console.log($('#monday').val())
      });
  },5000)
  &lt;/script&gt;
  </code></pre>
  
  <p>I have all the time <p>1</p>in my console</p>
  
  <p>and </p>
  
  <pre><code>&lt;script type="text/javascript" &gt;
  setTimeout(function(){
      $('#monday').val('test');
      $('textarea.ckeditor').each(function () {
      var $textarea = $(this);
      console.log($('#monday').val())
      });
  },5000)
  &lt;/script&gt;
  </code></pre>
  
  <p>return test</p>