
Ivan Bochkarev
Author
In assets/components/tinymcerte/js/vendor/tinymce/plugins/ create a folder for your plugin (e.g. mxs_mce_plugin) and add plugin.min.js inside it.
In that file add code like:
tinymce.PluginManager.add('mxs_mce_plugin', function (editor, url) {
editor.addButton('work_desc', {
text: 'Work desc',
icon: false,
onclick: function () {
editor.insertContent('<div class="work__desc"><p>Description here</p></div>');
}
});
});Where:
work_desc – button IDtext: 'Work desc' – label on the buttonicon: false – no icon<div class="work__desc"><p>Description here</p></div> – HTML inserted when the button is clickedGo to System settings > namespace tinymcerte and set:
tinymcerte.plugins add the plugin name, e.g. mxs_mce_plugintinymcerte.toolbar1 add the button name work_descClear cache from the menu.
For more details see: https://www.tiny.cloud/docs-4x/advanced/creating-a-plugin/