var id = "CKEDITOR_100";
/* Get CKEDITOR */
var editor = CKEDITOR.instances[id];
/* Set data to CKEDITOR */
editor.setData("The Content");
/* Update CKEDITOR content */
try {
for (var i in CKEDITOR.instances) {
if (CKEDITOR.instances[i]) {
CKEDITOR.instances[i].updateElement();
}
}
} catch (ex) {
}
/* Destroy CKEDITOR */
editor.destroy();
jsFiddle example of CKEDITOR instance update content
/* Get CKEDITOR */
var editor = CKEDITOR.instances[id];
/* Set data to CKEDITOR */
editor.setData("The Content");
/* Update CKEDITOR content */
try {
for (var i in CKEDITOR.instances) {
if (CKEDITOR.instances[i]) {
CKEDITOR.instances[i].updateElement();
}
}
} catch (ex) {
}
/* Destroy CKEDITOR */
editor.destroy();
jsFiddle example of CKEDITOR instance update content
No comments:
Post a Comment