关于FCKEditor编辑器外向编辑器内插入内容的问题(内祥)
今天把FCKEditor中的媒体上传功能禁掉,要从编辑器外面向编辑器内插入(图片,Flash等)内容。发现一向很灵的方法失效了,想请教一下大家有何高招。
我的方法如下:
1)var oEditor=parent.FCKeditorAPI.getInstance("content");
var win=oEditor.EditorWindow;
win.focus();
var doc=oEditor.EditorDoument;
var rng=doc.selection.createRange();
rng.pasteHTML(myHtml);
2) var oEditor=parent.FCKeditorAPI.getInstance("content");
oEditor.insertHtml(myHtml);
3) var iframe_1=parent.document.frames["Frames___content"];
var iframe_2=iframe_1.document.frames[0]; //编辑器的编辑区
var win=iframe_2.contentWindow;
var doc=iframe_2.contentWindow.document;
win.focus();
var rng=doc.selection.createRange();
rng.pasteHTML(myHtml);
高分送上,请速回复
我的方法如下:
1)var oEditor=parent.FCKeditorAPI.getInstance("content");
var win=oEditor.EditorWindow;
win.focus();
var doc=oEditor.EditorDoument;
var rng=doc.selection.createRange();
rng.pasteHTML(myHtml);
2) var oEditor=parent.FCKeditorAPI.getInstance("content");
oEditor.insertHtml(myHtml);
3) var iframe_1=parent.document.frames["Frames___content"];
var iframe_2=iframe_1.document.frames[0]; //编辑器的编辑区
var win=iframe_2.contentWindow;
var doc=iframe_2.contentWindow.document;
win.focus();
var rng=doc.selection.createRange();
rng.pasteHTML(myHtml);
高分送上,请速回复
...全文
相关推荐
使用Js获取、插入和更改FCKeditor编辑器里的内容
主要介绍了使用Js获取、插入和更改FCKeditor编辑器里的内容,包括JS操作Fckeditor的一些常用方法,需要的朋友可以参考下
利用FCKEditor作为邮件内容编辑器
NULL 博文链接:https://lyh7609.iteye.com/blog/381964
FCKeditor 编辑器插入代码功能实现步骤
4步轻松打造可以应用于任何FCK编辑器的CMS及其他程序,一个Fckeditor编辑器的插件,it560独家首发教程,无需增加字段,不修改代码,完全绿色环保。
向fckeditor编辑器插入指定代码的方法
向fckeditor编辑器插入指定代码的方法
javascript 获取FCKeditor内容
javascript获取FCKeditor内容,需要的朋友可以参考下。


