diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-01-20 18:46:28 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-01-20 18:46:28 +0100 |
commit | 6fa5b437a48485927e5d90abe061ee723f3b45c2 (patch) | |
tree | 118a32ddde4af92c7def9838b10beddb9f0fe241 /program/js/tinymce/plugins/contextmenu/plugin.min.js | |
parent | fac59dc441d25f7204fb6013bf88db90c01ae34b (diff) |
Update to TinyMCE 4.x
Diffstat (limited to 'program/js/tinymce/plugins/contextmenu/plugin.min.js')
-rw-r--r-- | program/js/tinymce/plugins/contextmenu/plugin.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/program/js/tinymce/plugins/contextmenu/plugin.min.js b/program/js/tinymce/plugins/contextmenu/plugin.min.js new file mode 100644 index 000000000..f4c664a06 --- /dev/null +++ b/program/js/tinymce/plugins/contextmenu/plugin.min.js @@ -0,0 +1 @@ +tinymce.PluginManager.add("contextmenu",function(e){var n,t=e.settings.contextmenu_never_use_native;e.on("contextmenu",function(o){var i;if(!o.ctrlKey||t){if(o.preventDefault(),i=e.settings.contextmenu||"link image inserttable | cell row column deletetable",n)n.show();else{var c=[];tinymce.each(i.split(/[ ,]/),function(n){var t=e.menuItems[n];"|"==n&&(t={text:n}),t&&(t.shortcut="",c.push(t))});for(var a=0;a<c.length;a++)"|"==c[a].text&&(0===a||a==c.length-1)&&c.splice(a,1);n=new tinymce.ui.Menu({items:c,context:"contextmenu"}),n.addClass("contextmenu"),n.renderTo(document.body),e.on("remove",function(){n.remove(),n=null})}var l={x:o.pageX,y:o.pageY};e.inline||(l=tinymce.DOM.getPos(e.getContentAreaContainer()),l.x+=o.clientX,l.y+=o.clientY),n.moveTo(l.x,l.y)}})});
\ No newline at end of file |