首页 > 代码库 > JS获取FckEditor的值

JS获取FckEditor的值

不需要在页面引用任何额外的JS文件

//获取编辑器中HTML内容function getEditorHTMLContents(EditorName){var oEditor = FCKeditorAPI.GetInstance(EditorName);return(oEditor.GetXHTML(true));}//获取编辑器中文字内容function getEditorTextContents(EditorName){var oEditor = FCKeditorAPI.GetInstance(EditorName);return(oEditor.EditorDocument.body.innerText);}//设置编辑器中内容function SetEditorContents(EditorName, ContentStr){var oEditor = FCKeditorAPI.GetInstance(EditorName) ;oEditor.SetHTML(ContentStr) ;}

 

JS获取FckEditor的值