Ckeditor user manual encountered some problems when using ckeditor, and now it is organized into a manual so that you can read it at any time. on the You need to create a new instance. If the ckeditor instance already exists if (ckeditor. instances ['textarea _ name']) {ckeditor. instances ['textarea _ name']. destroy ();} ckeditor. replace ('textarea _ name'); function loadeditor (ID) {var instance = ckeditor. instances [ID]; If (Instance) {ckeditor. remove (instance);} ckeditor. replace (ID);} var instance = Ckeditor. Instances ['test']; If (Instance) {ckeditor. Remove (Ckeditor. Instances ['test'] );} If (ckeditor. Instances [editorname]) delete ckeditor. Instances [editorname]; ckeditor. Replace (editorname );
Obtain the value of ckeditor.
VaR editor = ckeditor. replace ('editor1'); editor.doc ument. getbody (). gettext (); // obtain the plain text editor.doc ument. getbody (). gethtml (); // obtain the HTML text ckeditor. instances. content. getdata () = "") content is the ckeditor value set by the name of textarea. instances. content. setdata ("cccto"); var editor = ckeditor. replace ("content"); Editor. setdata ("cccto ");
Insert ckeditor. Instances. Message. inserthtml ('')