Linux 软件免费装

KDA Custom Editor Buttons

开发者 deniskey
更新时间 2026年9月2日 16:13
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

tinymce buttons custom html classic editor formats

下载

1.6.0 1.5.10 1.5.5 1.5.9 1.6.1

详情介绍:

KDA Custom Editor Buttons lets you define your own Classic Editor controls: Front-end CSS still belongs to your theme if you want a custom look; the plugin ships a neutral snippet window, Copy, line numbers, and token colors. Prism.js and Highlight.js are bundled, so nothing is loaded from a CDN. The admin UI is English and can be translated through translate.wordpress.org.

安装:

  1. Upload the plugin folder to /wp-content/plugins/kda-custom-editor-buttons
  2. Activate the plugin through the Plugins menu
  3. Go to Settings → KDA Editor Buttons
  4. Use Classic Editor when editing content

常见问题:

Does it work with the block editor (Gutenberg)?

Version 1 targets Classic Editor / TinyMCE. A soft admin notice appears if the block editor is the default.

Will my theme styles apply?

Yes on the front end, if the theme defines the classes you insert. The plugin also ships a default snippet window and token colors (light/dark). You can replace those stylesheets with the kda_ceb_snippet_css and kda_ceb_highlight_css filters.

How do I style the editor preview?

Use the standard WordPress mce_css filter in your theme, or the plugin filters kda_ceb_snippet_css / kda_ceb_highlight_css. The plugin does not store custom CSS.

Can I use my own Prism.js / Highlight.js files?

Yes, with the PHP filter kda_ceb_asset_base in your theme (it works for built-in, Prism.js and Highlight.js). The earlier kda_ceb_prism_base and kda_ceb_highlightjs_base filters still work and run on top of the universal one. See the Documentation tab in the settings screen or docs/adding-a-button.en.md / .ru.md.

Is there a Russian translation?

English is the source language. Translations are managed on translate.wordpress.org. The full user guide is in docs/adding-a-button.en.md and docs/adding-a-button.ru.md, and is also rendered inside the plugin under Settings → KDA Editor Buttons → Documentation in the admin language.

Can I copy the plugin's JS/CSS into my theme?

Yes. Open Settings → KDA Editor Buttons → Customization, set a folder path (must start and end with /, relative to the site root). Use the Copy select to pick Built-in, Prism.js, Highlight.js, or All libraries, then add one of these snippets to wp-config.php: ```php // short form: path comes from the setting above define( 'KDA_CEB_CUSTOM_ASSETS', true ); // detailed form: path is also defined in wp-config (the form's path // field becomes read-only when KDA_CEB_CUSTOM_PATH is set) define( 'KDA_CEB_CUSTOM_ASSETS', true ); define( 'KDA_CEB_CUSTOM_PATH', '/wp-content/themes/your-child/kda-ceb/' ); ``` The tab shows a green "Custom assets: active" badge when the constant is on. The plugin creates the destination folder if it doesn't exist, and surfaces a clear error when the web server can't write there. The tab reminds you to re-copy after a plugin update.

Can I lock the highlight engine and theme from wp-config?

Yes. Define KDA_CEB_HIGHLIGHT_ENGINE (builtin | prism | highlightjs) and KDA_CEB_HIGHLIGHT_THEME (light | dark) in wp-config.php. When set, they override the settings screen and the corresponding fields become read-only. Use this together with KDA_CEB_CUSTOM_ASSETS to pin the entire asset configuration in code: php define( 'KDA_CEB_CUSTOM_ASSETS', true ); define( 'KDA_CEB_CUSTOM_PATH', '/wp-content/themes/your-child/kda-ceb/' ); define( 'KDA_CEB_HIGHLIGHT_ENGINE', 'prism' ); define( 'KDA_CEB_HIGHLIGHT_THEME', 'dark' );

更新日志:

1.6.2 1.6.1 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.2 1.3.1 1.3.0 1.2.2 1.2.1 1.2.0 1.1.0 1.0.0