网上搜索了一下大概就两种办法:
1,var oEditor = FCKeditorAPI.GetInstance("FCKeditor1");
var oDOM =oEditor.EditorDocument;
alert(oDOM.body.innerText);2,var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');
var content = oEditor.GetXHTML(true);
alert(content);以上两种办法都不能获取内容。错误提示:EditorDocument为宽或不为对像
1,var oEditor = FCKeditorAPI.GetInstance("FCKeditor1");
var oDOM =oEditor.EditorDocument;
alert(oDOM.body.innerText);2,var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');
var content = oEditor.GetXHTML(true);
alert(content);以上两种办法都不能获取内容。错误提示:EditorDocument为宽或不为对像
var oEditor=FCKeditorAPI.GetInstance('content');
var content=oEditor.GetXHTML(true);
// 获取编辑器中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);
}
EditorDocument是fckeditor 里面自定义的.
GetInstance(<%=FCKeditor1.ClientID%>");
var oEditor = FCKeditorAPI.GetInstance("logContent");
oEditor.GetXHTML();
var oEditor=FCKeditorAPI.GetInstance('content');
var content=oEditor.GetXHTML(true);
// 获取编辑器中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);
}
EditorDocument是fckeditor 里面自定义的.