ckeditor get value by ajax

ckeditor send value with ajax method with jquery framework

<html>
  <script src='jquery-1.9.1.min.js'></script>
  <script src="ckeditor/ckeditor.js"></script>
  <body>
    <textarea id='test_ckeditor' name='test_ckeditor'></textarea>
    <button id='send'>send</button>
  </body>
  <script>
    CKEDITOR.replace( 'test_ckeditor');
    $(document).ready(function(){
      $('#send').click(function(){
         console.log(CKEDITOR.instances['test_ckeditor'].getData());
      });
    });
  </script>
</html>

Published by

G3n1k

just to remember what i had known :)

One thought on “ckeditor get value by ajax”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s