2

我在想要重建的旧 FCKEditor 中有一个插件。我看到了一个利用 iFrame 代码的示例。我已经定义并工作了按钮,我得到了对话框,但我不知道如何将选定的文本/html 放入对话框中,以便我可以操作它。

我的插件是 MS 文件对话框的近似值。当用户单击列出的文件(或列表中的 html 页面)时,我的代码会使用要在 HREF 属性中使用的 URL 更新链接文本框...我找不到任何可以告诉我如何获取的信息从编辑器中选择文本并在我的对话框正常工作后将其替换为编辑后的代码......有什么建议吗?我对此处于中间状态,因此如果您发布代码,请评论正在发生的事情,以便我理解。谢谢。

4

1 回答 1

1

Seems my cookies got cleared.... Here is an update. I use the following code:

CKEDITOR.instances.editor1.insertHtml('<a href=\x22www.google.com\x22>'
CKEDITOR.instances.editor1.getSelection().getNative() + '</a>');

I get the appropriate code pasted into the CKEditor instance on FireFox, but on IE (6.0 here at the office) it posts [object Object] and the source URL displays:

<a href="www.google.com">[object Object]</a>

Is there some issue i am missing? I am on CKE3.0 and will be downloading 3.01 but their changelog did not seem to have anything related to this so I am not sure if this is a bug or not.

于 2009-10-19T20:11:30.317 回答