Hello,
I would like to access the editor content from javascript; there are many threads on this subject in the forum, but nobody seems to have a working answer...
Here's my problem: I want to check that a user has written something in the editor before submitting the form to the server.
For example, if the field was a regular textarea, I would do this checking that textarea.value.length>0. How can I accomplish this with FCKEditor?
I think that this is a FAQ (unanswered) that deserves to be included in the official documentation.
regards,
Alessandro
I would like to access the editor content from javascript; there are many threads on this subject in the forum, but nobody seems to have a working answer...
Here's my problem: I want to check that a user has written something in the editor before submitting the form to the server.
For example, if the field was a regular textarea, I would do this checking that textarea.value.length>0. How can I accomplish this with FCKEditor?
I think that this is a FAQ (unanswered) that deserves to be included in the official documentation.
regards,
Alessandro
RE: How to check current editor content
var fck = FCKeditorAPI.GetInstance('NameOfInstance');

yourcontent = fck.GetHTML();
Thats it