function getEditorContents(){
var oEditor = FCKeditorAPI.GetInstance( "content");
alert(oEditor.GetXHTML(true));
}
//Insert the specified code into the editor
function insertHTMLToEditor(codeStr){
var oEditor = FCKeditorAPI. GetInstance("content");
if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG){
oEditor.InsertHtml(codeStr);
}else{
return false;
}
}
// Count the number of words in the content in the editor
function getLength(){
var oEditor = FCKeditorAPI.GetInstance("content");
var oDOM = oEditor.EditorDocument;
var iLength ;
if(document.all){
iLength = oDOM.body.innerText.length;
}else{
var r = oDOM.createRange();
r.selectNodeContents(oDOM .body);
iLength = r.toString().length;
}
alert(iLength);
}
//Execute the specified action
function ExecuteCommand(commandName){
var oEditor = FCKeditorAPI.GetInstance("content");
oEditor.Commands.GetCommand(commandName).Execute();
}
//Set the content in the editor
function SetContents (codeStr){
var oEditor = FCKeditorAPI.GetInstance("content");
oEditor.SetHTML(codeStr);
}