Hi!
How would I go about adding my own button that would either prompt for input and then drop a modified text of that into the editor, or modify a selected text?
I tried the basic example of:
tinymce.init({
selector: "textarea",
setup: function (editor) {
editor.ui.registry.addButton("customInsertButton", {
text: "My Button",
onAction: function (_) {
editor.insertContent(" It's my button! ");
},
});
},
});
to get a button added at all; I’ve put that into the “simple” themes tinymce.script.js and added:
"extensions": {
"postEditorConfigOverride": false,
"postEditorCustomScript": true
},
to the config.json in the simple themes config.json, afterwards I restarted publii, but there is no custom button in any of the editors, the docs don’t mention any example for the tinymce.script.js either, so how would I go about doing this?
Thanks!