Adding a custom button to the richtexteditor (tiny...
# help-with-umbraco
m
Adopted a U7 site which has since been upgraded to 12. In the U7 version, the previous developers had a custom list button (the button creates a instead of the normal - I now need to re-add this functionality but understand the logic has changed and I am baffled with how to do it. Anyone have a guide somewhere? I cannot seem to find where I modify the JS that initiates the editor (I assume I need to add some JS to add the button and add the logic to insert the custom html instead of a normal list)
From what I can see from tinyMCE, this would work, I just dont know where to add it:
setup: function (editor) { editor.ui.registry.addButton('customInsertButton', { text: 'My Button', onAction: function (_) { editor.insertContent(' item '); } });
t
I've got limited knowledge about this, but hopefully some of these pointers might help.. In the V7 site you should have a plugins folder that holds the js for the custom button. These should now live in wwwroot\umbraco\lib\tinymce\plugins now and the config added in appsettings.json (it used to live in it's own config, do a search for in your v7 solution). TinyMCE has been upgrade from 4 through to 6 in umbraco 12 i believe, so you'll need to either rewrite it (as you have in your comment above) or update the old plugin to use the new tinyMCE syntax/method calls.
13 Views