javascript fckeditor编辑器取值与赋值实现代码
程序员文章站
2022-03-20 15:07:11
获取编辑器中html内容 复制代码 代码如下: function geteditorhtmlcontents(editorname) { var oeditor = 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) ;
}
fckeditor 插件开发
复制代码 代码如下:
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 插件开发
上一篇: Vim编辑器基础
下一篇: FCKEDITOR 相关函数介绍