开发者

TinyMce plugin, how to copy 'Link' functionality

I'm creating a new plugin for TinyMce. However I cannot find any examples to see some of the functionality I've seen in other plugins. I've read their source code but I cannot find where it is done:

When you click on an 'A' element, the link/unlink buttons in the taskbar become en开发者_开发技巧abled. When you right click on an 'A' element, then click on the "Insert/edit link" icon that is shown in the popup menu, the "Insert/edit link" window is setup (has all the attributes for that particular link) prefilled. Could you suggest somewhere where I could learn how to do this? A file and line number is fine.

Thanks in advance.


Here a part of what you want. To highlight a UI button (link) you may do

tinymce.get(editorid).contentManager.setActive('link', true);

EDIT: For the other functionality have a look at editor_plugin_src.js/editor_plugin.js in the directory tiny_mce\plugins\advlink\. It is only small in size. You will find that a file called link.htm is being called to form the popup. Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜