1、在FCKeditor.net网站上看他们的Wiki才知道有一个Javascript API可以在网页运行状态下修改编辑器,对于我需要实现的功能很简单,代码如下:
2、如何用javascript获取FCKeditor在线编辑器值
FCKeditorAPI.GetInstance('<%=editor.ClientID %>').GetXHTML(true)
3、FCKEditor编辑器获得焦点:
var oEditor = FCKeditorAPI.GetInstance('content');
oEditor.Focus();
注意这里的Focus()是大写。
注意:本人只是搜集网上提供的一些解决办法,至于具体是否可行需要在实践中验证!
1 var editor = FCKeditorAPI.GetInstance("instance_name"); // 这里取得编辑器的实例
2 editor.InsertHtml("<strong>Hello World!</strong>"); // 使用InsertHtml方法将新的内容增加到编辑器中
2 editor.InsertHtml("<strong>Hello World!</strong>"); // 使用InsertHtml方法将新的内容增加到编辑器中
2、如何用javascript获取FCKeditor在线编辑器值
FCKeditorAPI.GetInstance('<%=editor.ClientID %>').GetXHTML(true)
3、FCKEditor编辑器获得焦点:
var oEditor = FCKeditorAPI.GetInstance('content');
oEditor.Focus();
注意这里的Focus()是大写。
注意:本人只是搜集网上提供的一些解决办法,至于具体是否可行需要在实践中验证!