function getEditorContents(){
var oEditor = FCKeditorAPI .GetInstance( "content");
Alert(oEditor.GetXHTML(true));
}
//지정된 코드를 편집기에 삽입
function insertHTMLToEditor(codeStr){
var oEditor = FCKeditorAPI.GetInstance("content");
if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG){
oEditor.InsertHtml(codeStr)
}else{
return false;
}
// 편집기에서 콘텐츠의 단어 수를 계산합니다.
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)
}
//지정된 작업 실행
function ExecuteCommand(commandName){
var oEditor = FCKeditorAPI.GetInstance("content")
oEditor.Commands.GetCommand(commandName).Execute()
}//Set 편집기의 콘텐츠
function SetContents (codeStr){
var oEditor = FCKeditorAPI.GetInstance("content")
oEditor.SetHTML(codeStr)