I have to create a custom button on my TinyMCE editor on Voyager, but its not working,
Here is my code:
function tinymce_setup_callback(editor)
{
console.log("loaded");
editor.ui.registry.addButton('customInsertButton', {
text: 'My Button',
onAction: function (_) {
editor.insertContent(' <strong>It\'s my button!</strong> ');
}
});
}
I am sure this code can be executed, but not working.
I tried a lot of different stuff, but I have no ideas anymore.