- Code: Select all
tinymce.init({
toolbar: 'mybutton',
setup: function (editor) {
editor.addButton('mybutton', {
text: 'My button',
icon: false,
onclick: function () {
editor.insertContent(' <b>It\'s my button!</b> ');
}
});
},
...
}
Above there are two properties: toolbar and setup. It's all clear with "toolbar", I define it as a string parameter in .spec file:
- Code: Select all
"model": {
"toolbar": {
"type": "string",
"default": "undo redo | etc, etc..."
},
...
}
What is the right way to configure a property of type "function"? I didn't find a mention of it in the manual. Moreover the aforementioned "setup" function can only be called at time of initialization. It doesn't appear possible to call "tinymce.init({})" after the component has been initialized.
Any suggestions?