Ckeditor sends default content

Go To StackoverFlow.com

0

I use ckeditor with a default content. Then I initialize (replace textarea) CKEditor with jquery and I edit the text. The problem is that var data = $( 'textarea.editor' ).val(); returns default content and also getData(). What I have to do to grab the actual content? Thank you very much

var ed = $( '#ed' ).ckeditor(
      {toolbar :[
                 { name: 'basicstyles', items : [ 'Bold','Italic' ] },
                 {name: 'link', items:['Link']},    
                 { name: 'colors', items : [ 'TextColor' ] }
                ]
       }
      );
2012-04-04 19:13
by Surfer on the fall
can you please provide some code - kommradHomer 2012-04-04 19:13
Just done. thanks - Surfer on the fall 2012-04-04 19:40


1

From the developers guide: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/jQuery_Adapter

You need to make sure that your jQueryAdapter script is included after the ckeditor script.

In order to create editor instances, load the usual CKEditor core script file as well as the jQuery Adapter file, in the following order:

<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/ckeditor/adapters/jquery.js"></script>
2012-04-04 19:44
by Thomas Jones
Ads