/* Import plugin specific language pack */ tinyMCE.importPluginLanguagePack('advimage', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk'); function TinyMCE_advimage_getInfo() { return { longname : 'Advanced image', author : 'Moxiecode Systems', authorurl : 'http://tinymce.moxiecode.com', infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html', version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion }; }; function TinyMCE_advimage_getControlHTML(control_name) { switch (control_name) { case "image": var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvImage\');return false;'; return ''; } return ""; } function TinyMCE_advimage_execCommand(editor_id, element, command, user_interface, value) { switch (command) { case "mceAdvImage": var template = new Array(); template['file'] = '../../plugins/advimage/image.htm'; template['width'] = 480; template['height'] = 380; // Language specific width and height addons template['width'] += tinyMCE.getLang('lang_advimage_delta_width', 0); template['height'] += tinyMCE.getLang('lang_advimage_delta_height', 0); var inst = tinyMCE.getInstanceById(editor_id); var elm = inst.getFocusElement(); if (elm != null && tinyMCE.getAttrib(elm, 'class').indexOf('mceItem') != -1) return true; tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); return true; } return false; } function TinyMCE_advimage_cleanup(type, content) { switch (type) { case "insert_to_editor_dom": var imgs = content.getElementsByTagName("img"); for (var i=0; i