8
0
tinymce-editor/tinymce/plugins/anchor/plugin.min.js
Marat 2cb9c3aa14 Squashed 'copy_this/modules/bla/bla-tinymce/' content from commit 835609d
git-subtree-dir: copy_this/modules/bla/bla-tinymce
git-subtree-split: 835609d658ef23894653104da64769f67e13f94e
2015-02-23 12:18:22 +01:00

1 zeile
508 B
JavaScript

tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="";"A"==b.tagName&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(b){a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:b.data.name}))}})}a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})});