獲取編輯器中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) ;
}
FCKeditor 插件開發
您可能感興趣的文章:- JS操作Fckeditor的一些常用方法(獲取、插入等)
- CKEditor無法驗證的解決方案(js驗證+jQuery Validate驗證)
- javascript獲取ckeditor編輯器的值(實現代碼)
- FCKeditorAPI 手冊 js操作獲取等
- fckeditor常用Js,獲取fckeditor內容,統計fckeditor字數,向fckeditor寫入指定代碼
- FCKEditor常用Js代碼,獲取FCK內容,統計FCK字數,向FCK寫入指定代碼
- FCKeditor提供了一個完整的JavaScript API
- JavaScript 使用Ckeditor+Ckfinder文件上傳案例詳解