Skip to content

DOC-3390: Add editor.on('change') example to events page#4054

Merged
kemister85 merged 1 commit intofeature/8/DOC-3387from
feature/8/DOC-3387_DOC-3390
Apr 13, 2026
Merged

DOC-3390: Add editor.on('change') example to events page#4054
kemister85 merged 1 commit intofeature/8/DOC-3387from
feature/8/DOC-3387_DOC-3390

Conversation

@kemister85
Copy link
Copy Markdown
Contributor

Summary

  • Adds content change callback example using setup option and editor.on('change') to events.adoc
  • Placed after the ExecCommand example and before browser-native events section
  • Addresses Context7 benchmark Q4 (score 30/100)

Source validation

  • Change event confirmed in events.adoc line 191: fires { level: UndoLevel } when content changes are committed
  • editor.on() method confirmed as standard EventDispatcher API
  • setup callback pattern matches existing examples in the same file

Test plan

  • Example uses editor.on('change', fn) inside setup callback
  • Example is complete and copy-paste runnable
  • Change event description matches source (fires on committed changes)
  • Antora build passes with no errors

Add content change callback example using setup option and
editor.on('change') to address Context7 benchmark Q4 (30/100).
@kemister85 kemister85 requested review from a team and soritaheng as code owners April 13, 2026 02:20
@kemister85 kemister85 requested review from EkimChau, MitchC1999 and tiny-james and removed request for a team April 13, 2026 02:20
@kemister85 kemister85 merged commit b509ec0 into feature/8/DOC-3387 Apr 13, 2026
5 checks passed
@kemister85 kemister85 deleted the feature/8/DOC-3387_DOC-3390 branch April 13, 2026 23:06
kemister85 added a commit that referenced this pull request Apr 13, 2026
* DOC-3388: Add getContent and setContent examples to save-content partial (#4052)

Add programmatic get/set content section with runnable examples
using editor.getContent(), getContent({ format: 'text' }), and
editor.setContent() to address Context7 benchmark Q3 (12/100).

* DOC-3389: Strengthen add-css-options page for custom content CSS (#4053)

Update description and add keywords for content_css and content_style.
Add intro paragraph explaining the two options to address Context7
benchmark Q8 (0/100).

* DOC-3390: Add editor.on('change') example to events page (#4054)

Add content change callback example using setup option and
editor.on('change') to address Context7 benchmark Q4 (30/100).

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

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

Add toolbar button section showing PluginManager.add with
editor.ui.registry.addButton and editor.addCommand to address
Context7 benchmark Q9 (15/100).

* Update modules/ROOT/pages/creating-a-plugin.adoc

Co-authored-by: Millie <millie.macdonald@tiny.cloud>

---------

Co-authored-by: Millie <millie.macdonald@tiny.cloud>

* DOC-3392: Add programmatic mode.set example to readonly docs (#4056)

Add example showing editor.mode.set('readonly') and
editor.mode.set('design') for runtime mode switching to address
Context7 benchmark Q7 (25/100).

* DOC-3393: Add plugins and toolbar multi-plugin example to quickstart (#4057)

Add "Configure plugins and toolbar" section with plugins: 'image code'
and toolbar example to the quickstart partial to address Context7
benchmark Q2 (56/100).

* DOC-3394: Add content filtering intro to content-filtering page (#4058)

Update description and keywords to mention valid_elements,
invalid_elements, extended_valid_elements. Add intro paragraph
summarizing key filtering options to address Context7 benchmark
Q10 (22/100).

* DOC-3395: Improve quickstart keywords for selector/ID discoverability (#4059)

Add selector, textarea, id, tinymce.init keywords to all quickstart
pages (cloud, npm, php, .net, zip) to address Context7 benchmark
Q1 (62/100).

* DOC-3396: Improve custom-toolbarbuttons and file-image-upload metadata (#4060)

Update description and keywords for custom-toolbarbuttons (addButton,
custom button), file-image-upload (images_upload_handler), and
upload-images pages to address Context7 benchmark Q5/Q6 (25/100 each).

---------

Co-authored-by: Millie <millie.macdonald@tiny.cloud>
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.

3 participants