js获取和设置FCK编辑器的内容
2012-11-09 12:53
477 查看
今天在公司用js想获取FCK和设置FCK的值。在网上找了下,下面是在网上找到的
// 获取编辑器中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) ;
}
// 获取编辑器中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复制网页内容,JS获取FCK编辑器的值
- JS复制网页内容,JS获取FCK编辑器的值
- JS复制网页内容,JS获取FCK编辑器的值
- js获取FCK编辑器信息/取值/赋值具体方法
- fckeditor编辑器之js客户端获取和设置 fckeditor 属性的方法
- 前台用JS获取FCK编辑器
- js获取鼠标坐标,设置div的高度、位置、内容等,及注意要点
- js获取/设置cuteeditor的内容(转)
- js获取,设置FCKeditor内容
- 获取和设置tinyMCE 4编辑器的内容
- fckeditor编辑器之js客户端获取和设置 fckeditor 属性的方法
- js获取fckeditor表单内容和相关fckeditor设置
- JS编辑器获取选择内容的HTML多浏览器兼容性写法(支持Chorme、Firefox)
- 如何获取和设置TinyMce编辑器的内容
- JS编辑器获取选择内容的HTML多浏览器兼容性写法(支持Chorme、Firefox)
- 【JS获取与设置】FCKeditor编辑器的值
- FCK常用Js,获取FCK内容,统计FCK字数,向FCK写入指定代码
- FCK常用Js,获取FCK内容,统计FCK字数,向FCK写入指定代码
- js获取内容中的url链接,并设置a标签