diff --git a/thirdparty/tinymce_ssbuttons/editor_plugin_src.js b/thirdparty/tinymce_ssbuttons/editor_plugin_src.js index 699f5f9e0..195972305 100644 --- a/thirdparty/tinymce_ssbuttons/editor_plugin_src.js +++ b/thirdparty/tinymce_ssbuttons/editor_plugin_src.js @@ -31,12 +31,12 @@ ed.addButton('sslink', {title : ed.getLang('tinymce_ssbuttons.insertlink'), cmd : 'sslink', 'class' : 'mce_link'}); ed.addButton('ssimage', {title : ed.getLang('tinymce_ssbuttons.insertimage'), cmd : 'ssimage', 'class' : 'mce_image'}); - ed.addCommand("sslink", function(ed) { - jQuery('#Form_EditorToolbarLinkForm').entwine('ss').open(); + ed.addCommand('sslink', function(ed) { + jQuery('#' + this.id).entwine('ss').openLinkDialog(); }); - ed.addCommand("ssimage", function(ed) { - jQuery('#Form_EditorToolbarMediaForm').entwine('ss').open(); + ed.addCommand('ssimage', function(ed) { + jQuery('#' + this.id).entwine('ss').openMediaDialog(); }); // Disable link button when no link is selected @@ -49,4 +49,4 @@ // Adds the plugin class to the list of available TinyMCE plugins tinymce.PluginManager.add("ssbuttons", tinymce.plugins.SSButtons); -})(); \ No newline at end of file +})(); diff --git a/thirdparty/tinymce_ssmacron/editor_plugin_src.js b/thirdparty/tinymce_ssmacron/editor_plugin_src.js index d30bd634c..f14da99d4 100644 --- a/thirdparty/tinymce_ssmacron/editor_plugin_src.js +++ b/thirdparty/tinymce_ssmacron/editor_plugin_src.js @@ -19,8 +19,8 @@ init : function(ed, url) { - // Register commands - ed.addCommand('mceInsertMacron', function() { + // Register commands + ed.addCommand('mceInsertMacron', function() { ed.windowManager.open({ file : url + '/macron.htm', width : 350 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), @@ -31,13 +31,12 @@ }); }); - // Register buttons - ed.addButton('ssmacron', { - title : 'Insert a Macron', - cmd : 'mceInsertMacron', - image : url + '/img/macron.png' - }); - + // Register buttons + ed.addButton('ssmacron', { + title : 'Insert a Macron', + cmd : 'mceInsertMacron', + image : url + '/img/macron.png' + }); } });