Skip to content

DOC-3391: Add addButton and addCommand example to creating-a-plugin#4055

Open
kemister85 wants to merge 1 commit intofeature/8/DOC-3387from
feature/8/DOC-3387_DOC-3391
Open

DOC-3391: Add addButton and addCommand example to creating-a-plugin#4055
kemister85 wants to merge 1 commit intofeature/8/DOC-3387from
feature/8/DOC-3387_DOC-3391

Conversation

@kemister85
Copy link
Copy Markdown
Contributor

Summary

  • Adds "Adding a toolbar button to a custom plugin" section to creating-a-plugin.adoc
  • Shows PluginManager.add, editor.addCommand, editor.ui.registry.addButton, and editor.execCommand
  • Shows how to wire plugin + toolbar in tinymce.init
  • Addresses Context7 benchmark Q9 (score 15/100)

Source validation

  • PluginManager.add confirmed at PluginManager.ts / AddOnManager.ts
  • editor.addCommand confirmed at EditorCommands.ts / Editor.ts
  • editor.ui.registry.addButton confirmed at Registry.ts
  • editor.execCommand confirmed at Editor.ts

Test plan

  • All 4 API methods verified against tinymce source
  • Plugin registration pattern matches existing boilerplate example
  • external_plugins usage matches existing docs pattern
  • Antora build passes with no errors

Add toolbar button section showing PluginManager.add with
editor.ui.registry.addButton and editor.addCommand to address
Context7 benchmark Q9 (15/100).
@kemister85 kemister85 requested review from a team and soritaheng as code owners April 13, 2026 02:20
@kemister85 kemister85 requested review from EkimChau, ShiridiGandham and tiny-james and removed request for a team April 13, 2026 02:20
:description_short: Introducing plugin creation, with an example.
:description: A short introduction to creating plugins for TinyMCE along with an example plugin.
:keywords: plugin, plugin.js, plugin.min.js, tinymce.js
:description: Create custom TinyMCE plugins using PluginManager.add, editor.ui.registry.addButton, and editor.addCommand. Register plugins, add toolbar buttons, and define commands.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels a little odd

Suggested change
:description: Create custom TinyMCE plugins using PluginManager.add, editor.ui.registry.addButton, and editor.addCommand. Register plugins, add toolbar buttons, and define commands.
:description: Create custom TinyMCE plugins using PluginManager.add, and expand their functionality with custom toolbar buttons using editor.ui.registry.addButton, custom commands using editor.addCommand, and more.

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants