Adds buttons to Summernote to insert HTML elements or classes required by Marketplace themes.
Adds buttons to Kanka’s Summernote editor toolbar that can be used to insert HTML elements or classes required by various Marketplace themes with a simple click. You will no longer need to memorize or look up the code, nor to type it all in or copy-paste it into the editor. Just select the plugin (and variant, if applicable) to insert the appropriate code, and customize it further if needed. Most features are compatible with both the visual and code editors.
To appear in the dropdown options, a theme must be:
p tag, but if the text at that position is also in a span, that span will be targeted instead). A status message will briefly appear to confirm that a class was applied or removed and indicate the type of element affected.For your theme to be considered for addition, it will need:
:root { --summernote-insert-<plugin-name>: enabled; }.Please contact me (@Salvatos) via Kanka’s Discord (#marketplace channel) to get your theme added to the script. While not mandatory, I would also appreciate if your plugin’s description mentioned and linked to this script. Here is an example you can use, though feel free to make it your own:
<p><i><b>This plugin supports the <a href="https://greatest.deepsurf.us/en/scripts/430213-kanka-marketplace-toolbar-for-summernote" target="_blank">Marketplace Toolbar for Summernote</a>! You can install this user script with a browser extension to insert the necessary HTML in your entities without memorizing or referencing this page.</i></p>
Also, let me know if you make substantial changes to your approved plugin that would require code or classes be added or removed from this script’s options!