码迷,mamicode.com
首页 > Web开发 > 详细

JS获取FckEditor的值

时间:2017-07-12 18:53:56      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:引用   bsp   需要   turn   name   ted   额外   getx   中文   

不需要在页面引用任何额外的JS文件

//获取编辑器中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获取FckEditor的值

标签:引用   bsp   需要   turn   name   ted   额外   getx   中文   

原文地址:http://www.cnblogs.com/sky6699/p/7156791.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!