Kanka Summernote Marketplace Plugin HTML Inserter

Adds a button to Summernote that inserts HTML snippets required by Marketplace themes.

目前为 2021-07-27 提交的版本。查看 最新版本

作者
Salvatos
评分
0 0 0
版本
3
创建于
2021-07-27
更新于
2021-07-27
大小
7.0 KB
许可证
暂无
适用于

Adds a dropdown button to Kanka’s Summernote editor toolbar that can be used to insert HTML snippets from various Marketplace themes with a simple click. No need to memorize or look up the code, nor to type it all in or copy-paste it into the editor. Just the select the plugin (and variant, if applicable) and edit its snippet as needed. This is compatible with both the visual and code editors.

In version 1, the snippet is added at the end of the editor. Future releases may be able to insert snippets at the cursor position.

To appear in the dropdown, a theme must be:

  • officially supported by the theme’s creator and this userscript’s maintainer;
  • installed and enabled on the campaign.

(For the initial release, Simple Tooltip and Tip Box are enabled by default whether or not you have installed them. This will be cleaned up as plugin makers start to officially support this script.)

Theme makers looking to add your plugins to this tool:

For your theme to be considered for addition, it will need:

  • to rely on adding HTML elements to the entry (themes that rely on adding classes to existing elements are not suitable for this script);
  • to contain a CSS custom property on the root element, which will act as a flag to let this script know that the plugin is enabled on a campaign. This flag will look like :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.

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址