2014-03-06 22:09:14 -05:00
|
|
|
tinymce.PluginManager.add("wplink",function(a){var b;a.addCommand("WP_Link",function(){b&&b.disabled()||"undefined"==typeof window.wpLink||window.wpLink.open(a.id)}),a.addShortcut("alt+shift+a","","WP_Link"),a.addShortcut("ctrl+k","","WP_Link"),a.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Alt+Shift+A",cmd:"WP_Link",onPostRender:function(){b=this,a.on("nodechange",function(c){var d=c.element;b.disabled(a.selection.isCollapsed()&&"A"!==d.nodeName),b.active("A"===d.nodeName&&!d.name)})}}),a.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),a.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Alt+Shift+A",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0})});
|