L
L
lightalex2015-06-12 19:36:05
JavaScript
lightalex, 2015-06-12 19:36:05

How to extract information from ckeditor?

Hello!
There is some textarea with class ckeditor and id editor1
There is some code that connects ckfinder to ckeditor:

CKEDITOR.replace( 'editor1', {
          filebrowserBrowseUrl : '/ckfinder/ckfinder.html',
          filebrowserImageBrowseUrl : '/ckfinder/ckfinder.html?type=Images',
          filebrowserFlashBrowseUrl : '/ckfinder/ckfinder.html?type=Flash',
          filebrowserUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
          filebrowserImageUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
          filebrowserFlashUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
          filebrowserWindowWidth : '1000',
          filebrowserWindowHeight : '700'
        });

And there is a jQuery code that stops working after executing the above js code:
var text=$('textarea.ckeditor').val();
 alert(text);

More precisely, it does not stop working, but only alerts the original contents of the textarea (that is, even if you edit something in the ckeditor window, it is not entered into the textarea)
If you do not connect ckfinder, then ckeditor substitutes new data in the textarea for any changes
Who knows how to get current code from ckeditor when ckfinder is connected?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nazar Mokrinsky, 2015-06-12
@nazarpc

Look at the ckeditor API in the documentation?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question