获取编辑器中的HTML内容
复制代码代码如下所示:
功能geteditorhtmlcontents(editorname)
{
无功oeditor = fckeditorapi.getinstance(editorname);
返回(oeditor.getxhtml(真正的));
}

在编辑器中获取文本内容
复制代码代码如下所示:
功能geteditortextcontents(editorname)
{
无功oeditor = fckeditorapi.getinstance(editorname);
Return (oEditor.EditorDocument.body.innerText);
}

在编辑器中设置内容
复制代码代码如下所示:
功能seteditorcontents(editorname,contentstr)
{
无功oeditor = fckeditorapi.getinstance(editorname);
OEditor.SetHTML(contentstr);
}

FCKeditor插件开发