mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Using entwine calls in ssbuttons TinyMCE plugin
This commit is contained in:
parent
4140ddad5e
commit
7a29a4a0ca
@ -20,14 +20,13 @@
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
init : function(ed, url) {
|
||||
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('ssflash', {title : ed.getLang('tinymce_ssbuttons.insertflash'), cmd : 'ssflash', 'class' : 'mce_flash', 'image': url + '/img/flash.gif'});
|
||||
|
||||
ed.addCommand("sslink", function(ed) {
|
||||
jQuery('#Form_EditorToolbarLinkForm')[0].open();
|
||||
jQuery('#Form_EditorToolbarLinkForm').entwine('ss').open();
|
||||
});
|
||||
|
||||
ed.addCommand("ssimage", function(ed) {
|
||||
@ -39,15 +38,12 @@
|
||||
});
|
||||
|
||||
ed.onNodeChange.add(function(ed, o) {
|
||||
if ($('Form_EditorToolbarLinkForm').updateSelection) {
|
||||
$('Form_EditorToolbarLinkForm').updateSelection(ed);
|
||||
$('Form_EditorToolbarLinkForm').respondToNodeChange(ed);
|
||||
}
|
||||
jQuery('Form_EditorToolbarLinkForm').entwine('ss').updateSelection();
|
||||
jQuery('Form_EditorToolbarLinkForm').entwine('ss').respondToNodeChange();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Adds the plugin class to the list of available TinyMCE plugins
|
||||
tinymce.PluginManager.add("ssbuttons", tinymce.plugins.SSButtons);
|
||||
})();
|
Loading…
Reference in New Issue
Block a user