I created a plugin for TinyMCE, and I can’t find a way to use the default “image” button.
Any ideas how to do that?
//init
ed.addButton('extimage', {
title : 'advimage.image_desc',
cmd : 'mceExtImage'
});
//later on
tinymce.PluginManager.add('extimage', tinymce.plugins.ExtImagePlugin);
This one talks about custom buttons:
http://www.tinymce.com/wiki.php/API3:method.tinymce.Editor.addButton
Here’s another clarification: http://www.tinymce.com/wiki.php/Buttons/controls
“advlink” overrides the “link” button, and uses the exact same image. How can I make my plugin do the same to the “image” button?
From what I understand, this code should work (and it doesn’t..):
ed.addButton('image', {
title : 'advimage.image_desc',
cmd : 'mceExtImage'
});
tinymce.PluginManager.add('extimage', tinymce.plugins.ExtImagePlugin);
The pluginname does not have anything to do with your button.
You will need to add extimage to your buttonconfig in order to be able to see the button in the tinymce UI.