javascript fckeditor编辑器取值与赋值实现代码(js编辑器手机版)一篇读懂

随心笔谈12个月前发布 admin
98 0



获取编辑器中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 APIJavaScript 使用Ckeditor+Ckfinder文件上传案例详解

© 版权声明

相关文章