Skip to content

DOC-3388: Add getContent and setContent examples to save-content partial#4052

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

DOC-3388: Add getContent and setContent examples to save-content partial#4052
kemister85 merged 1 commit intofeature/8/DOC-3387from
feature/8/DOC-3387_DOC-3388

Conversation

@kemister85
Copy link
Copy Markdown
Contributor

Summary

  • Adds "Get and set content programmatically" section to save-content.adoc with runnable editor.getContent() and editor.setContent() examples
  • Addresses Context7 benchmark Q3 (score 12/100)

Source validation

  • editor.getContent(args?) confirmed at Editor.ts:880-883
  • editor.setContent(content, args?) confirmed at Editor.ts:858-860
  • getContent({ format: 'text' }) option confirmed in source JSDoc

Test plan

  • API signatures verified against tinymce source (Editor.ts)
  • Examples use tinymce.activeEditor consistent with source JSDoc
  • Antora build passes with no errors on modified files
  • xref links to API docs match existing structure

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).
@kemister85 kemister85 requested review from a team and soritaheng as code owners April 13, 2026 02:19
@kemister85 kemister85 requested review from EkimChau, ShiridiGandham and tiny-james and removed request for a team April 13, 2026 02:19
@kemister85 kemister85 merged commit cfe5702 into feature/8/DOC-3387 Apr 13, 2026
5 checks passed
@kemister85 kemister85 deleted the feature/8/DOC-3387_DOC-3388 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