// Get HTML content in the editor
Function geteditorhtmlcontents (editorname ){
VaR oeditor = Fckeditorapi. getinstance (editorname );
Return (Oeditor. getxhtml ( True ));
}
//Get text in the editor
Function geteditortextcontents (editorname ){
VaR oeditor=Fckeditorapi. getinstance (editorname );
Return(Oeditor. editordocument. Body. innertext );
}
// Set content in the editor
Function seteditorcontents (editorname, contentstr ){
VaR oeditor = Fckeditorapi. getinstance (editorname );
Oeditor. sethtml (contentstr );
}
< Script Type = " Text/JavaScript " Language = " Javascript " >
Function ()
{
// Obtain the HTML of the control.
VaR checkcontent = Fckeditorapi. getinstance ( " Fckeditor1 " ). Getxhtml ();
Alert (checkcontent );
// Get the length of HTML
VaR Len = Fckeditorapi. getinstance ( " Fckeditor1 " ). Getxhtml (). length;
Alert (LEN );
// Obtain the fck control.
VaR oeditor = Fckeditorapi. getinstance ( ' Fckeditor1 ' );
// Get the text in the editor
VaR text = Oeditor. editordocument. Body. innertext;
Alert (text );
// Focus on the editor
Oeditor. Focus ();
}
</ Script >
Editor = Fckeditorapi. getinstance ( ' News_content ' ); // Comment is the set InstanceName value.
VaR Frame = Editor. editordocument. Body. innerhtml;