mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-03 06:38:51 +02:00
Merge pull request #333 from halkyon/master
Fixing media and link popups not opening in HtmlEditorField
This commit is contained in:
commit
2ffb6adb5b
@ -31,12 +31,12 @@
|
|||||||
ed.addButton('sslink', {title : ed.getLang('tinymce_ssbuttons.insertlink'), cmd : 'sslink', 'class' : 'mce_link'});
|
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.addButton('ssimage', {title : ed.getLang('tinymce_ssbuttons.insertimage'), cmd : 'ssimage', 'class' : 'mce_image'});
|
||||||
|
|
||||||
ed.addCommand("sslink", function(ed) {
|
ed.addCommand('sslink', function(ed) {
|
||||||
jQuery('#Form_EditorToolbarLinkForm').entwine('ss').open();
|
jQuery('#' + this.id).entwine('ss').openLinkDialog();
|
||||||
});
|
});
|
||||||
|
|
||||||
ed.addCommand("ssimage", function(ed) {
|
ed.addCommand('ssimage', function(ed) {
|
||||||
jQuery('#Form_EditorToolbarMediaForm').entwine('ss').open();
|
jQuery('#' + this.id).entwine('ss').openMediaDialog();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Disable link button when no link is selected
|
// Disable link button when no link is selected
|
||||||
@ -49,4 +49,4 @@
|
|||||||
|
|
||||||
// Adds the plugin class to the list of available TinyMCE plugins
|
// Adds the plugin class to the list of available TinyMCE plugins
|
||||||
tinymce.PluginManager.add("ssbuttons", tinymce.plugins.SSButtons);
|
tinymce.PluginManager.add("ssbuttons", tinymce.plugins.SSButtons);
|
||||||
})();
|
})();
|
||||||
|
17
thirdparty/tinymce_ssmacron/editor_plugin_src.js
vendored
17
thirdparty/tinymce_ssmacron/editor_plugin_src.js
vendored
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
|
|
||||||
init : function(ed, url) {
|
init : function(ed, url) {
|
||||||
// Register commands
|
// Register commands
|
||||||
ed.addCommand('mceInsertMacron', function() {
|
ed.addCommand('mceInsertMacron', function() {
|
||||||
ed.windowManager.open({
|
ed.windowManager.open({
|
||||||
file : url + '/macron.htm',
|
file : url + '/macron.htm',
|
||||||
width : 350 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
|
width : 350 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
|
||||||
@ -31,13 +31,12 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Register buttons
|
// Register buttons
|
||||||
ed.addButton('ssmacron', {
|
ed.addButton('ssmacron', {
|
||||||
title : 'Insert a Macron',
|
title : 'Insert a Macron',
|
||||||
cmd : 'mceInsertMacron',
|
cmd : 'mceInsertMacron',
|
||||||
image : url + '/img/macron.png'
|
image : url + '/img/macron.png'
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user