会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
代码作坊
坊间的一切源于实战,用于实战
博客园
::
首页
::
新随笔
::
联系
::
订阅
::
管理
公告
FCKEditor的赋值和取值操作
Posted on
2007-04-24 14:05
老丹
阅读(
1994
) 评论(
2
)
编辑
收藏
举报
1、获取编辑器中HTML内容
function
getEditorHTMLContents(EditorName)
{
var
oEditor
=
FCKeditorAPI.GetInstance(EditorName);
return
(oEditor.GetXHTML(
true
));
}
2、获取编辑器中文字内容(在博客发布时获取无html代码摘要使用)
function
getEditorTextContents(EditorName)
{
var
oEditor
=
FCKeditorAPI.GetInstance(EditorName);
return
(oEditor.EditorDocument.body.innerText);
}
3、设置编辑器中内容
function
SetEditorContents(EditorName, ContentStr)
{
var
oEditor
=
FCKeditorAPI.GetInstance(EditorName) ;
oEditor.SetHTML(ContentStr) ;
}
会员力量,点亮园子希望
刷新页面
返回顶部
Powered by:
博客园
Copyright © 2024 老丹
Powered by .NET 8.0 on Kubernetes