首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

利用Javascript取跟设FCKeditor值

2012-10-30 
利用Javascript取和设FCKeditor值// 获取编辑器中HTML内容function getEditorHTMLContents(EditorName) {

利用Javascript取和设FCKeditor值

// 获取编辑器中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) ;
}


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/hailang43/archive/2009/06/20/4285852.aspx

热点排行