FCK代码
<iframe scrolling="no" height="100%" frameborder="no" width="100%" src="/sysadm/webeditor/editor/fckeditor.html?InstanceName=CONTENT&Toolbar=Default" id="CONTENT___Frame"></iframe>fckeditor.html代码<tr id="eWysiwyg">
<td id="eWysiwygCell" height="100%" valign="top">
<iframe id="eEditorArea" name="eEditorArea" height="100%" width="100%" frameborder="no" src="fckblank.html"></iframe>
</td>
</tr>
<tr id="eSource" style="DISPLAY: none">
<td class="Source" height="100%" valign="top">
<textarea id="eSourceField" dir="ltr" style="WIDTH: 100%; HEIGHT: 100%"></textarea>
</td>
</tr>FCK按钮弹出a.html
<frameset>
<frame src="a.php"></frame>
<frame src="b.php"></frame>
</frameset>
现需要在b.php中向FCK编辑框插入内容,如何解决!
经已尝试多种办法,还没解决,希望高手耐心帮一下,谢谢!
<iframe scrolling="no" height="100%" frameborder="no" width="100%" src="/sysadm/webeditor/editor/fckeditor.html?InstanceName=CONTENT&Toolbar=Default" id="CONTENT___Frame"></iframe>fckeditor.html代码<tr id="eWysiwyg">
<td id="eWysiwygCell" height="100%" valign="top">
<iframe id="eEditorArea" name="eEditorArea" height="100%" width="100%" frameborder="no" src="fckblank.html"></iframe>
</td>
</tr>
<tr id="eSource" style="DISPLAY: none">
<td class="Source" height="100%" valign="top">
<textarea id="eSourceField" dir="ltr" style="WIDTH: 100%; HEIGHT: 100%"></textarea>
</td>
</tr>FCK按钮弹出a.html
<frameset>
<frame src="a.php"></frame>
<frame src="b.php"></frame>
</frameset>
现需要在b.php中向FCK编辑框插入内容,如何解决!
经已尝试多种办法,还没解决,希望高手耐心帮一下,谢谢!
fck_insertpic.html
dir_insertpic.php
list_insertpic.php
查了下,好像有四个文件是对FCK初始化的。
sample01.php sample02.php sample03.php sample04.php
貌似你提供的文件不全吧我特地试了个2.6.5的版本[]。。http://topic.csdn.net/u/20110425/11/2b3aae35-c665-4256-a090-f07757d9c731.html
版大#3的方式,,至少在ie下是可行的js跨页面获取,无非是opener,parent,top,window.frameName等一些方式
好像是setData()方法
同时在 fck_insertpic.html 的框架页面里也确实直接取不到编辑器对象
但你可以变通一下
在 fck_insertpic.html 中定义一个变量
var oEditor = window.parent.InnerDialogLoaded().FCK ;在框架页 比如b.htm中取得这个变量
var oEditor = window.parent.oEditor;
//然后就可以向编辑器写东西了
oEditor.InsertHtml('<br />我是框架页');几点建议:
最好不要改动系统原有的东西,也不要将扩展的功能直接放入系统中。
他本身提供了插件功能,所以宜将扩展的功能作为插件放进去
你己经加入了两个插件,仿照他们做你自己的插件不是更好吗?
FCKConfig.Plugins.Add( 'savehttpfiles');
// FCKConfig.Plugins.Add( 'placeholder', 'en,it' ) ;
不是你加进去的吗?plugins 目录下的 savehttpfiles 和 placeholder 不是你建的吗?
这两个控件都网上一些教程里的http://dev.firnow.com/course/1_web/webjs/200877/131057.html相关的不是很多,但都比较规范
一开始我也是看到这个文章,但上司说不用这样麻烦,叫我直接在FCKConfig.ToolbarSets["Default"]里加的。