CKEditor 3.0 插件 - 获取选定的文本/HTML
我在旧的 FCKEditor 中有一个插件,我想重建。我看到了一个利用 iFrame 代码的示例。我已经定义了按钮并正常工作,我得到了对话框,但我不知道如何将选定的文本/html 放入对话框中,以便我可以操纵它。
我的插件类似于 MS 文件对话框。当用户单击列出的文件(或列表中的 html 页面)时,我的代码会使用要在 HREF 属性中使用的 URL 更新链接文本框...我找不到任何可以告诉我如何获取从编辑器中选择文本,并在我的对话框正常工作后将其替换为编辑后的代码...有什么建议吗?我对此处于中间状态,因此如果您发布代码,请评论正在发生的事情,以便我能够理解。谢谢。
I have a plug in in the old FCKEditor I would like to rebuild. I saw an example that leveraged the iFrame code. The I've got the button defined and working, I get the dialog, but I cannot figure out how to get the selected text/html into the dialog so I can manipulate it.
My plug in is an approximaiton of the MS File dialog box. When the user clicks on a file that is listed (or an html page in the list) my code updates the link text box with the URL to be used in the HREF property... I cannot find anything that will tell me how to get selected text from the editor and replace it with the edited code once my dialog does it's work... Any suggestions? I am intermediate with this so if you post code please comment on what's happening so I can understand. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来我的 cookie 已被清除......这是更新。我使用以下代码:
我将适当的代码粘贴到 FireFox 上的 CKEditor 实例中,但在 IE(办公室中的 6.0)上,它发布 [object Object] 并显示源 URL
:我缺少一些问题吗?我使用的是 CKE3.0,并将下载 3.01,但他们的更新日志似乎没有与此相关的任何内容,所以我不确定这是否是一个错误。
Seems my cookies got cleared.... Here is an update. I use the following code:
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:
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.