eWebEditor 以及FCKeditor 一些取值和设定值的JS函数

来源:互联网 发布:淘宝用户名可以注销吗 编辑:程序博客网 时间:2024/06/06 08:53

//FCKeditor
var oEditor = FCKeditorAPI.GetInstance(EditorName) ;
oEditor.SetHTML(ContentStr) ;

 

eWebEditor1为eWebEditor ID
// 取编辑器内容
var sHTML = eWebEditor1.getHTML();
// 设置编辑器内容
eWebEditor1.setHTML('<b>Hello My World!</b>');
// 在当前选择处理插入
eWebEditor1.insertHTML('This is Insert Function!');
// 在尾部追加内容
eWebEditor1.appendHTML('This is Append Function!');
// 改变编辑器状态为代码编辑状态
eWebEditor1.setMode('CODE');

原创粉丝点击