How to make CKEditor update the text content without using JQuery?
I am using CKEditor for mailbox. After typing the content in the editor, I need to click on send button. After clicking the mail goes, but without the content that I have typed in it.
This is because the CKEditor is not updating the value of content until I select the typed text and perform some 开发者_开发百科operation from the toolbar, like Bold, Italic etc.
I have added a javascript: onclick to the send button and trying to reload the editor or perform some operation from toolbar .
Neither I can use JQuery nor any plugin to solve this. What else can I try for this?
Try adding this function to the page and call it on the onclick of the button. It'll update the textarea's with the value of the ckeditor
function UpdateFields() {
for (instance in CKEDITOR.instances) {
CKEDITOR.instances[instance].updateElement();
}
}
精彩评论