承接 doubleedesign/doublee-tinymce 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

doubleedesign/doublee-tinymce

Composer 安装命令:

composer require doubleedesign/doublee-tinymce

包简介

Customised configuration and plugins for WordPress/ClassicPress websites by Double-E Design.

README 文档

README

Features

Note

The plugin does not provide any front-end CSS for any of the features described below, and only very minimal and easily-overridden CSS for the editing interface. It is expected that you will provide your own styling via your theme or plugin.

Format selector

Replaces the default heading/paragraph menu with a custom format selector that includes additional styles. By default, this also limits the available heading levels to H2 through H4 (it is assumed that the H1 on your page is handled by the template your TinyMCE-driven content appears on), but this can be customised using a filter hook.

format-selector.png

Miniblocks

The name of these comes from their origin as a desire to insert very simple WordPress blocks into TinyMCE content areas, but that not actually being possible. So they aren't actual Gutenberg blocks in any sense of the term, but they are similar to blocks in that they are markup-controlled blocks of content that users can fill in a form to insert or edit.

When the user clicks on an inserted miniblock, a form appears allowing them to edit it using the same UI as when inserting it.

Callout

Put a message in a themed box to draw attention to it.

miniblock-callout.png

Pullquote

Insert a blockquote with a citation.

miniblock-pullquote.png

Button group1

Insert a group of themed button-style links. If you are using Comet Components, the buttons will be generated using the Button component logic and template (including theme override, if applicable) present at the time of insertion2.

miniblock-buttongroup.png

Tables

This plugin adds the ability to add and format basic HTML tables. This feature is based on 10up's now-archived MCE Table Buttons plugin, but with the latest (at the time of writing) 4.x version of the TinyMCE tables plugin, reduced in-editor styling options, and additional processing to add BEM class names to some of the table elements.

Default toolbar configurations

This plugin performs some filtering on the mce_buttons_* hooks to customise the toolbars used across instances of TinyMCE in the WordPress admin, including those used by Advanced Custom Fields (ACF) if it is installed and active. It also adds some custom toolbar types for ACF (adding to its existing Basic and Full toolbars).

Classic editor with standard toolbars

Standard WP/Classic Editor toolbars

ACF Full toolbars

ACF Full toolbars

ACF Basic toolbars

ACF Basic toolbars

ACF Minimal toolbar

ACF Minimal toolbar

Customisation

Plugins and themes can further customise TinyMCE when using this plugin by using the following filters:

Filter Parameters Usage
doublee_tinymce_theme_colours array $colours Set the colour palette for miniblocks that have theme colour pickers, in key (name) and value (hex code) format.
doublee_tinymce_styleselect_formats array $formats Modify the styles/formats available in the text format dropdown.
doublee_tinymce_always_remove_buttons array $buttons Modify which buttons are always removed from the toolbars.
doublee_tinymce_miniblock_defaults array $defaults Modify the default values for miniblock fields, such as setting a default alignment for button groups.

Loading CSS into the editor

WordPress provides a method to load your theme's CSS into TinyMCE editors using the add_editor_style() function, for example:

add_action('admin_enqueue_scripts', function() {
	add_editor_style('path/to/your/editor-style.css');
});

If you are using ACF, you can also add CSS to its TinyMCE fields like so:

add_filter('tiny_mce_before_init', function($settings
	$settings['content_css'] .= ', ' . esc_url(get_stylesheet_directory_uri() . '/path/to/your/editor-style.css');
	
	return $settings;
});

Development

JavaScript

Rollup is used to compile the JavaScript files. To install the dependencies and then compile the scripts, run:

npm install
npm run build

PHP

Use composer.dev.json in development environments like so:

$env:COMPOSER = "composer.dev.json"; composer install
$env:COMPOSER = "composer.dev.json"; composer update

When adding PHP classes, if they are in subdirectories you will need to add them to composer.json to use the namespace that ignores directories.

After adding any new class, run:

composer dump-autoload -o

CSS

SASS is used for the admin styling. It is not included as a project dependency as it is assumed you will have it installed globally (if you don't and are a Windows user, I recommend using Chocolatey to install it via CLI).

To compile the CSS, I recommend setting up a file watcher in PhpStorm or the equivalent in other IDEs, but you can also do it via CLI:

sass src/editor-ui.scss src/editor-ui.css --watch

Testing

The PHP code has unit tests, written using Pest. To install the dependencies for this, run:

composer install

Then to run all tests, I recommend using the test runner in PhpStorm, which can also provide in-IDE coverage reporting out of the box. But you can also run all tests via CLI, e.g., for all tests:

vendor\bin\pest

Footnotes

  1. This miniblock requires Advanced Custom Fields Pro to be installed and active, as it leverages some of its UI components for the editing form. I may look at removing this dependency in future, but I do not have a timeline for it.

  2. Because TinyMCE fields store content as plain HTML, if changes are made to the button logic or rendering template they will not be automatically reflected in existing button groups. You would need to edit and re-save each button group to update them.

doubleedesign/doublee-tinymce 适用场景与选型建议

doubleedesign/doublee-tinymce 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 80 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 doubleedesign/doublee-tinymce 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 doubleedesign/doublee-tinymce 我们能提供哪些服务?
定制开发 / 二次开发

基于 doubleedesign/doublee-tinymce 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 80
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-12-29