Hi, I would like to add a custom button to the TinyMCE Editor. When the user is going to hit the new icon (or even text) a predefined content supposed to be added to the textarea.
My approach was to add following snippet to the getSuiteSettings($html, $width)
function in include/SuiteEditor/SuiteEditorConnector.php
editor.addButton('mybutton', {
text: 'My Button',
icon: false,
onclick: function() {
tinymce.activeEditor.formatter.toggle('custom_format')
}
});
right after
editor.on('focus', function(e){
onClickTemplateBody();
});
But the button does not show up. What am I doing wrong? Can anyone point me in the right direction? Any help is much appreciated. Thanks.