In Umbraco, I have edited the document type > richtexteditor and I can see the "customlist" is available and selected. I have also added an alert("test") within the plugin.min.js in the plugin source code and can confirm the alert does fire (even within the tinymce.PluginManager.add('customlists', (editor, url) => {} call, so the plugin itself is definately loaded.
Problem however is that the button (or text rather) does not show within the toolbar. I suspect that I need to specify in which toolbar, but the base configuration in the appsettings.json does not have seem to look out for the toolbar property. I have added it to the CustomConfig namespace, but no difference.
Or, it could be my code, but I tested it in codepen and the Toolbar item does show, so I suspect it's down to the initialization part. Any ideas?
Custom button not showing in tinyMCE toolbar
Based on numerous posts about this, I have been dabbling with adding a custom button to the RTE. The button simply creates a
- Item
into the editor.The direction I have taken was to add a new "plugin" to www/umbraco/lib/tinymce/plugins/customlist/plugin.min.js:
This is based on the syntax from TinyMCE for the v6 of their editor. In my appsettings.json, I have added the below under the Umbraco.CMS namespace:
In Umbraco, I have edited the document type > richtexteditor and I can see the "customlist" is available and selected. I have also added an alert("test") within the plugin.min.js in the plugin source code and can confirm the alert does fire (even within the tinymce.PluginManager.add('customlists', (editor, url) => {} call, so the plugin itself is definately loaded.
Problem however is that the button (or text rather) does not show within the toolbar. I suspect that I need to specify in which toolbar, but the base configuration in the appsettings.json does not have seem to look out for the toolbar property. I have added it to the CustomConfig namespace, but no difference.
Or, it could be my code, but I tested it in codepen and the Toolbar item does show, so I suspect it's down to the initialization part. Any ideas?
Hi mauzilla
Looks like the fun starts here:
https://github.com/umbraco/Umbraco-CMS/blob/8e609af90168a7c5e088b30193266733269457ec/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js#L350
I have had a similar thing before, but along time ago, tinymce4+Umbraco where my plugin didn't specify an icon, and so didn't appear...?
If you look at the way Umbraco do the custom Umbraco Plugins for TinyMce
https://github.com/umbraco/Umbraco-CMS/blob/8e609af90168a7c5e088b30193266733269457ec/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js#L629
You can see
they specify an icon... ?
regards
Marc
is working on a reply...