forked from kete/image_selector_tinymce_plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
editor_plugin.js
1 lines (1 loc) · 960 Bytes
/
editor_plugin.js
1
(function(){tinymce.PluginManager.requireLangPack('imageselector');tinymce.create('tinymce.plugins.ImageselectorPlugin',{init:function(ed,url){ed.addCommand('mceImageselector',function(){ed.windowManager.open({file:url+'/dialog.htm',width:900+parseInt(ed.getLang('imageselector.delta_width',0)),height:500+parseInt(ed.getLang('imageselector.delta_height',0)),resizable:true,inline:1,translate_i18n:false},{plugin_url:url})});ed.addButton('imageselector',{title:'imageselector.desc',cmd:'mceImageselector',image:url+'/img/imageselector.png'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('imageselector',n.nodeName=='IMG')})},createControl:function(n,cm){return null},getInfo:function(){return{longname:'Imageselector plugin',author:'Walter McGinnis',authorurl:'http://waltermcginnis.com',infourl:'https://github.com/kete/image_selector_tinymce_plugin',version:"0.3"}}});tinymce.PluginManager.add('imageselector',tinymce.plugins.ImageselectorPlugin)})();