Get your own copy
Don't hesitate! Just download and test it all by yourself for free!
// Adds a custom button to the editor and when a user clicks the button it will open
// an alert box with the selected contents as plain text.
tinyMCE.init({
...
theme_advanced_buttons1 : 'example,..'
setup : function(ed) {
// Register example button
ed.addButton('example', {
title : 'example.desc',
image : '../jscripts/tiny_mce/plugins/example/img/example.gif',
onclick : function() {
ed.windowManager.alert('Hello world!! Selection: ' + ed.selection.getContent({format : 'text'}));
}
});
}
});
| Name | Type | Description |
|---|---|---|
| name | String | Button name to add. |
| settings | Object | Settings object with title, cmd etc. |
Search documentation.