From 9a4a3ed896a689b9a29fd6140dfe398004f79abb Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Mon, 16 Nov 2026 12:28:53 +1000 Subject: [PATCH 1/6] TINYDOC-3583: Added new tinymceai_decoupled_container option to render AI Chat and AI Review in an element provided by a CSS selector. --- antora.yml | 2 +- .../tinymceai-multi-editor-groups/example.js | 11 ++- .../tinymceai-multi-editor-groups/index.html | 20 +++-- .../tinymceai-multi-editor-groups/index.js | 11 ++- .../tinymceai-multi-editor/example.js | 6 +- .../tinymceai-multi-editor/index.html | 7 +- .../tinymceai-multi-editor/index.js | 6 +- modules/ROOT/pages/8.11.0-release-notes.adoc | 29 +++++++ .../pages/editor-command-identifiers.adoc | 2 +- .../ROOT/pages/tinymceai-multi-editor.adoc | 57 +++++++++++++- modules/ROOT/pages/tinymceai.adoc | 46 +++++++++++ .../partials/commands/tinymceai-cmds.adoc | 70 ++++++++++++++++- .../configuration/tinymceai_options.adoc | 76 ++++++++++++++++++- .../partials/misc/admon-requires-8.11v.adoc | 1 + 14 files changed, 315 insertions(+), 29 deletions(-) create mode 100644 modules/ROOT/partials/misc/admon-requires-8.11v.adoc diff --git a/antora.yml b/antora.yml index bafd9ca548..19d1029342 100644 --- a/antora.yml +++ b/antora.yml @@ -10,7 +10,7 @@ asciidoc: companyurl: https://www.tiny.cloud cdnurl: https://cdn.tiny.cloud/1/no-api-key/tinymce/8/tinymce.min.js tdcdnurl: https://cdn.tiny.cloud/1/_your_api_key_/tinydrive/8/tinydrive.min.js - tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8/tinymce.min.js + tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8-dev/tinymce.min.js tinydrive_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinydrive/8/tinydrive.min.js webcomponent_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-webcomponent/dist/tinymce-webcomponent.min.js jquery_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-jquery@2/dist/tinymce-jquery.min.js diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/example.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/example.js index 1e6f3cbbe6..632c15fa93 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/example.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/example.js @@ -5,14 +5,13 @@ const sharedSettings = { height: '400px', plugins: ['tinymceai', 'advlist', 'lists', 'link', 'autolink', 'table', 'wordcount'], toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic | bullist numlist | link', - tinymceai_sidebar_type: 'floating', tinymceai_chat_welcome_message: '

Welcome to TinyMCE AI. Pick an action below or type your own prompt.

', tinymceai_chat_welcome_actions: [ { text: 'Here are some actions to get started:' }, { title: 'Summarize the document', command: 'TinyMCEAIQuickActionsSummarize' }, { title: 'Continue writing', command: 'TinyMCEAIQuickActionContinueWriting' }, { title: 'Translate to Spanish', command: 'TinyMCEAIQuickActionTranslate', value: 'spanish' }, - { title: 'Review my document', command: 'ToggleSidebar', value: 'tinymceai-review' } + { title: 'Review my document', command: 'TinyMCEAIToggleApp', value: 'tinymceai-review', icon: 'ai-review' } ], tinymceai_token_provider: async () => { return fetch('/api/tinymceai-token', { credentials: 'include' }) @@ -58,11 +57,12 @@ const sharedSettings = { ] }; -// Group 1: the Introduction and Native integration editors share one AI sidebar. +// Group 1: the Introduction and Native integration editors share AI Chat and AI Review in one panel. tinymce.init({ ...sharedSettings, selector: 'textarea#tinymceai-multi-editor-groups-introduction', tinymceai_group: 'article-opening', + tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-opening-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel. tinymceai_document_name: 'Introduction', tinymceai_document_description: 'The introduction of the article. A title, a short paragraph that sets out the topic, and a figure.' }); @@ -71,15 +71,17 @@ tinymce.init({ ...sharedSettings, selector: 'textarea#tinymceai-multi-editor-groups-native-integration', tinymceai_group: 'article-opening', + tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-opening-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel. tinymceai_document_name: 'Native integration', tinymceai_document_description: 'The section on moving from external AI tools to AI built into the editor, with a bulleted list of benefits.' }); -// Group 2: the Workflow comparison and Adoption challenges editors share a separate AI sidebar and never see the content of group 1. +// Group 2: the Workflow comparison and Adoption challenges editors share a separate panel and never see the content of group 1. tinymce.init({ ...sharedSettings, selector: 'textarea#tinymceai-multi-editor-groups-workflow-comparison', tinymceai_group: 'article-analysis', + tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-analysis-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel. tinymceai_document_name: 'Workflow comparison', tinymceai_document_description: 'The section that compares traditional and AI-enhanced workflows. Keep the comparison table.' }); @@ -88,6 +90,7 @@ tinymce.init({ ...sharedSettings, selector: 'textarea#tinymceai-multi-editor-groups-adoption-challenges', tinymceai_group: 'article-analysis', + tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-analysis-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel. tinymceai_document_name: 'Adoption challenges', tinymceai_document_description: 'The closing section on adoption challenges. Two short paragraphs.' }); diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.html b/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.html index a64691acbf..6d0b259da9 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.html +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.html @@ -1,7 +1,9 @@ -
+

Group 1: article-opening

-

Introduction (hosts the AI sidebar of group 1)

+

Introduction (first editor of group 1)

+
+
-

Native integration (shares the AI sidebar of group 1)

+

Native integration (second editor of group 1)

+
+
+

Group 2: article-analysis

-

Workflow comparison (hosts the AI sidebar of group 2)

+

Workflow comparison (first editor of group 2)

+
+
-

Adoption challenges (shares the AI sidebar of group 2)

+

Adoption challenges (second editor of group 2)

+
+
+
diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.js index 5eec82ad4b..a9d525b923 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.js @@ -54,7 +54,6 @@ const sharedSettings = { 'quickbars', 'tinymceai', 'tinycomments', 'mentions', 'revisionhistory', 'suggestededits', 'uploadcare' ], toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic | bullist numlist | link', - tinymceai_sidebar_type: 'floating', quickbars_selection_toolbar: 'tinymceai-quickactions addcomment', tinymceai_chat_welcome_message: '

Welcome to TinyMCE AI. Pick an action below or type your own prompt.

', tinymceai_chat_welcome_actions: [ @@ -62,7 +61,7 @@ const sharedSettings = { { title: 'Summarize the document', command: 'TinyMCEAIQuickActionsSummarize' }, { title: 'Continue writing', command: 'TinyMCEAIQuickActionContinueWriting' }, { title: 'Translate to Spanish', command: 'TinyMCEAIQuickActionTranslate', value: 'spanish' }, - { title: 'Review my document', command: 'ToggleSidebar', value: 'tinymceai-review' } + { title: 'Review my document', command: 'TinyMCEAIToggleApp', value: 'tinymceai-review', icon: 'ai-review' } ], toolbar_mode: 'sliding', visual: false, @@ -126,12 +125,13 @@ const sharedSettings = { ] }; -// Group 1: the Introduction and Native integration editors share one AI sidebar. +// Group 1: the Introduction and Native integration editors share AI Chat and AI Review in one panel. tinymce.init({ ...sharedSettings, selector: 'textarea#tinymceai-multi-editor-groups-introduction', revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-groups-introduction'), tinymceai_group: 'article-opening', + tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-opening-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel. tinymceai_document_name: 'Introduction', tinymceai_document_description: 'The introduction of the article. A title, a short paragraph that sets out the topic, and a figure.' }); @@ -141,16 +141,18 @@ tinymce.init({ selector: 'textarea#tinymceai-multi-editor-groups-native-integration', revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-groups-native-integration'), tinymceai_group: 'article-opening', + tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-opening-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel. tinymceai_document_name: 'Native integration', tinymceai_document_description: 'The section on moving from external AI tools to AI built into the editor, with a bulleted list of benefits.' }); -// Group 2: the Workflow comparison and Adoption challenges editors share a separate AI sidebar and never see the content of group 1. +// Group 2: the Workflow comparison and Adoption challenges editors share a separate panel and never see the content of group 1. tinymce.init({ ...sharedSettings, selector: 'textarea#tinymceai-multi-editor-groups-workflow-comparison', revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-groups-workflow-comparison'), tinymceai_group: 'article-analysis', + tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-analysis-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel. tinymceai_document_name: 'Workflow comparison', tinymceai_document_description: 'The section that compares traditional and AI-enhanced workflows. Keep the comparison table.' }); @@ -160,6 +162,7 @@ tinymce.init({ selector: 'textarea#tinymceai-multi-editor-groups-adoption-challenges', revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-groups-adoption-challenges'), tinymceai_group: 'article-analysis', + tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-analysis-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel. tinymceai_document_name: 'Adoption challenges', tinymceai_document_description: 'The closing section on adoption challenges. Two short paragraphs.' }); diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js index 59f9baea49..808356963e 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js @@ -4,14 +4,16 @@ const sharedSettings = { height: '400px', plugins: ['tinymceai', 'advlist', 'lists', 'link', 'autolink', 'table', 'wordcount'], toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic | bullist numlist | link', - tinymceai_sidebar_type: 'floating', + // Decoupled mode: AI Chat and AI Review render in the panel next to the editors instead of in a sidebar. + tinymceai_decoupled_container: '#tinymceai-multi-editor-panel', + tinymceai_decoupled_show: 'tinymceai-chat', tinymceai_chat_welcome_message: '

Welcome to TinyMCE AI. Pick an action below or type your own prompt.

', tinymceai_chat_welcome_actions: [ { text: 'Here are some actions to get started:' }, { title: 'Summarize the document', command: 'TinyMCEAIQuickActionsSummarize' }, { title: 'Continue writing', command: 'TinyMCEAIQuickActionContinueWriting' }, { title: 'Translate to Spanish', command: 'TinyMCEAIQuickActionTranslate', value: 'spanish' }, - { title: 'Review my document', command: 'ToggleSidebar', value: 'tinymceai-review' } + { title: 'Review my document', command: 'TinyMCEAIToggleApp', value: 'tinymceai-review', icon: 'ai-review' } ], tinymceai_token_provider: async () => { return fetch('/api/token', { credentials: 'include' }) diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html index 6c2a5ef576..f1e1be93b6 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html @@ -1,4 +1,6 @@

Introduction (first editor in the group)

+
+
-

Body (shares the AI sidebar with the Introduction)

+

Body (second editor in the group)

+
+
+
diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js index 600056c785..9c1fbb4549 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js @@ -54,7 +54,9 @@ const sharedSettings = { 'quickbars', 'tinymceai', 'tinycomments', 'mentions', 'revisionhistory', 'suggestededits', 'uploadcare' ], toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic | bullist numlist | link', - tinymceai_sidebar_type: 'floating', + // Decoupled mode: AI Chat and AI Review render in the panel next to the editors instead of in a sidebar. + tinymceai_decoupled_container: '#tinymceai-multi-editor-panel', + tinymceai_decoupled_show: 'tinymceai-chat', quickbars_selection_toolbar: 'tinymceai-quickactions addcomment', tinymceai_chat_welcome_message: '

Welcome to TinyMCE AI. Pick an action below or type your own prompt.

', tinymceai_chat_welcome_actions: [ @@ -62,7 +64,7 @@ const sharedSettings = { { title: 'Summarize the document', command: 'TinyMCEAIQuickActionsSummarize' }, { title: 'Continue writing', command: 'TinyMCEAIQuickActionContinueWriting' }, { title: 'Translate to Spanish', command: 'TinyMCEAIQuickActionTranslate', value: 'spanish' }, - { title: 'Review my document', command: 'ToggleSidebar', value: 'tinymceai-review' } + { title: 'Review my document', command: 'TinyMCEAIToggleApp', value: 'tinymceai-review', icon: 'ai-review' } ], toolbar_mode: 'sliding', visual: false, diff --git a/modules/ROOT/pages/8.11.0-release-notes.adoc b/modules/ROOT/pages/8.11.0-release-notes.adoc index 68c3245e33..beea305344 100644 --- a/modules/ROOT/pages/8.11.0-release-notes.adoc +++ b/modules/ROOT/pages/8.11.0-release-notes.adoc @@ -71,6 +71,35 @@ The {productname} {release-version} release includes an accompanying release of For information on the **** plugin, see: xref:.adoc[]. +=== TinyMCE AI + +The {productname} {release-version} release includes an accompanying release of the **TinyMCE AI** premium plugin. + +**TinyMCE AI** includes the following additions. + +==== Added new `+tinymceai_decoupled_container+` option to render AI Chat and AI Review in an element provided by a CSS selector +// #TINYMCE-15031 + +Previously, the **TinyMCE AI** plugin always rendered AI Chat and AI Review in an editor sidebar, either static or floating. Applications that have their own panel or layout for the AI interface could not render AI Chat and AI Review there. + +In {productname} {release-version}, the new xref:tinymceai.adoc#tinymceai_decoupled_container[`+tinymceai_decoupled_container+`] option turns on xref:tinymceai.adoc#decoupled-mode[decoupled mode]. The option takes a CSS selector, and the plugin renders AI Chat and AI Review inside the matching element instead of in a sidebar. The new xref:tinymceai.adoc#tinymceai-toggling-apps-decoupled[`+TinyMCEAIToggleApp+`] command opens and closes AI Chat and AI Review in that element, and the matching `+TinyMCEAIToggleApp+` event reports each change. Decoupled mode also works with xref:tinymceai-multi-editor.adoc#decoupled-mode-group[multi-editor groups]. + +==== Added `+tinymceai_decoupled_show+` option to set the initial view +// #TINYMCE-15032 + +Previously, the core xref:customsidebar.adoc#sidebar_show[`+sidebar_show+`] option could open an AI sidebar when the editor loaded, but no option opened AI Chat or AI Review in decoupled mode. + +In {productname} {release-version}, the new xref:tinymceai.adoc#tinymceai_decoupled_show[`+tinymceai_decoupled_show+`] option opens AI Chat or AI Review in the element set by `+tinymceai_decoupled_container+` when the editor initializes. + +==== New `+TinyMCEAIPreview+` query command state to check whether an editor has a preview of AI suggestions open +// #TINYMCE-15033 + +Previously, integrations had no public way to check whether an editor showed a preview of AI suggestions that the user had not yet resolved. + +In {productname} {release-version}, `+queryCommandState('TinyMCEAIPreview')+` returns `+true+` while the editor shows a preview of AI suggestions to resolve. For details, see xref:tinymceai.adoc#tinymceai-preview-state[Checking for an open preview]. + +For information on the **TinyMCE AI** plugin, see: xref:tinymceai.adoc[TinyMCE AI]. + [[accompanying-premium-plugin-end-of-life-announcement]] == Accompanying Premium plugin end-of-life announcement diff --git a/modules/ROOT/pages/editor-command-identifiers.adoc b/modules/ROOT/pages/editor-command-identifiers.adoc index bb046e2e29..01a0b7481e 100644 --- a/modules/ROOT/pages/editor-command-identifiers.adoc +++ b/modules/ROOT/pages/editor-command-identifiers.adoc @@ -530,7 +530,7 @@ include::partial$commands/tableofcontents-cmds.adoc[leveloffset=+3] [[tinymceai]] ==== TinyMCE AI -The xref:tinymceai.adoc[TinyMCE AI (`+tinymceai+`)] plugin registers AI Chat and AI Review sidebars, Quick Actions-related editor commands, and uses the core `+ToggleSidebar+` command for sidebar visibility. The following partial covers `+ToggleSidebar+`, floating-sidebar behavior, and plugin command names. +The xref:tinymceai.adoc[TinyMCE AI (`+tinymceai+`)] plugin registers AI Chat and AI Review sidebars, Quick Actions-related editor commands, and uses the core `+ToggleSidebar+` command for sidebar visibility. The following partial covers `+ToggleSidebar+`, floating-sidebar behavior, the `+TinyMCEAIToggleApp+` command for decoupled mode, and plugin command names. include::partial$commands/tinymceai-cmds.adoc[leveloffset=+3] diff --git a/modules/ROOT/pages/tinymceai-multi-editor.adoc b/modules/ROOT/pages/tinymceai-multi-editor.adoc index 417a9fd0fd..c8688944f3 100644 --- a/modules/ROOT/pages/tinymceai-multi-editor.adoc +++ b/modules/ROOT/pages/tinymceai-multi-editor.adoc @@ -15,7 +15,7 @@ In a group, Chat, Review, and Quick Actions work across the content of every edi [[demo]] == Demo -The demo below splits an article across an Introduction editor and a Body editor in one group. Select the image:icons-premium/ai-assistant.svg[Chat icon,24px] Chat toolbar button in either editor to open the shared Chat sidebar, which the first editor hosts. Then ask the AI to change both parts of the article, or run a review over both editors. +The demo below splits an article across an Introduction editor and a Body editor in one group. The group uses xref:tinymceai.adoc#decoupled-mode[decoupled mode], so AI Chat and AI Review open in a panel next to the editors, and AI Chat opens when the page loads. Select the image:icons-premium/ai-assistant.svg[Chat icon,24px] Chat or image:icons-premium/ai-review.svg[Review icon,24px] Review toolbar button in either editor to open and close the apps in the panel. Then ask the AI to change both parts of the article, or run a review over both editors. liveDemo::tinymceai-multi-editor[] @@ -29,6 +29,8 @@ include::partial$misc/admon-inline-not-supported.adoc[] The first editor of the group to be created hosts the shared Chat sidebar and Review sidebar. The Chat and Review toolbar buttons and menu items in every other editor of the group open, close, and focus that shared sidebar. +In xref:tinymceai.adoc#decoupled-mode[decoupled mode], the first editor of the group hosts AI Chat and AI Review in the element set by its xref:tinymceai.adoc#tinymceai_decoupled_container[`+tinymceai_decoupled_container+`] value. The Chat and Review toolbar buttons and menu items in every editor of the group open and close AI Chat and AI Review in that element, and the keyboard shortcuts in every editor open them. + [[chat]] === Chat @@ -71,7 +73,7 @@ While the {pluginname} plugin previews changes from Chat or Quick Actions, each [[discarding-suggestions]] === Discarding pending suggestions -When any editor in the group has pending suggestions, the {pluginname} plugin asks for confirmation before it discards them and starts a different AI task. For example, the confirmation dialog appears when the user switches between the Chat sidebar and the Review sidebar, or runs a Quick Action while a review has pending suggestions. +With the floating sidebar, when any editor in the group has pending suggestions, the {pluginname} plugin asks for confirmation before it discards them and starts a different AI task. For example, the confirmation dialog appears when the user switches between the Chat sidebar and the Review sidebar, or runs a Quick Action while a review has pending suggestions. If the user confirms, the plugin discards the pending suggestions in every editor of the group and returns each editor to normal editing. If the user cancels, the plugin keeps every preview and pending suggestion. @@ -80,7 +82,7 @@ If the user confirms, the plugin discards the pending suggestions in every edito To group editors, load the `+tinymceai+` plugin in each editor and set the same xref:tinymceai.adoc#tinymceai_group[`+tinymceai_group+`] value on each editor in the group. Give each editor a unique xref:tinymceai.adoc#tinymceai_document_name[`+tinymceai_document_name+`] value, and optionally a xref:tinymceai.adoc#tinymceai_document_description[`+tinymceai_document_description+`] value that describes the content to the AI. -Multi-editor mode is supported with the floating sidebar. Set xref:tinymceai.adoc#tinymceai_sidebar_type[`+tinymceai_sidebar_type+`] to `+'floating'+` for every editor in the group. +The floating sidebar and xref:tinymceai.adoc#decoupled-mode[decoupled mode] both support multi-editor mode. For the floating sidebar, set xref:tinymceai.adoc#tinymceai_sidebar_type[`+tinymceai_sidebar_type+`] to `+'floating'+` for every editor in the group. For decoupled mode, see xref:#decoupled-mode-group[Grouped editors in decoupled mode]. Use the same {pluginname} configuration for every editor in a group, for example by sharing a settings object between the `+tinymce.init+` calls: @@ -116,10 +118,57 @@ Grouped editors must be on the same page and use the same `+tinymce+` instance. For information about installing the plugin and enabling AI features, see xref:tinymceai.adoc[Plugin Reference]. +[[decoupled-mode-group]] +=== Grouped editors in decoupled mode + +include::partial$misc/admon-requires-8.11v.adoc[] + +To use xref:tinymceai.adoc#decoupled-mode[decoupled mode] with a group, add one element for the group to the page and set xref:tinymceai.adoc#tinymceai_decoupled_container[`+tinymceai_decoupled_container+`] to a CSS selector that matches it. The plugin uses the value set on the first editor created in the group, so the option can go in the shared settings object. To open AI Chat or AI Review when the page loads, set xref:tinymceai.adoc#tinymceai_decoupled_show[`+tinymceai_decoupled_show+`]. + +[source,html] +---- +
+
+ + +
+
+
+---- + +[source,js] +---- +const sharedSettings = { + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_group: 'article', + tinymceai_decoupled_container: '#ai-panel', // change this value according to the HTML + tinymceai_decoupled_show: 'tinymceai-chat', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.text()).then(token => ({ token })); + } +}; + +tinymce.init({ + ...sharedSettings, + selector: 'textarea#introduction', // change this value according to the HTML + tinymceai_document_name: 'Introduction' +}); + +tinymce.init({ + ...sharedSettings, + selector: 'textarea#body', // change this value according to the HTML + tinymceai_document_name: 'Body' +}); +---- + +To open or close AI Chat and AI Review programmatically, see xref:tinymceai.adoc#tinymceai-toggling-apps-decoupled[`+TinyMCEAIToggleApp+`]. + [[multiple-groups]] === Multiple groups on one page -A page can contain several independent groups, each with a different xref:tinymceai.adoc#tinymceai_group[`+tinymceai_group+`] value. Each group has its own shared sidebar, and an editor in one group never receives the content of an editor in another group. For a configuration with two groups, see the xref:tinymceai.adoc#tinymceai_group[two-group example]. +A page can contain several independent groups, each with a different xref:tinymceai.adoc#tinymceai_group[`+tinymceai_group+`] value. Each group has its own shared sidebar, and an editor in one group never receives the content of an editor in another group. In decoupled mode, give each group its own element and set a different xref:tinymceai.adoc#tinymceai_decoupled_container[`+tinymceai_decoupled_container+`] value for each group. For a configuration with two groups, see the xref:tinymceai.adoc#tinymceai_group[two-group example]. [[configuration]] == Configuration diff --git a/modules/ROOT/pages/tinymceai.adoc b/modules/ROOT/pages/tinymceai.adoc index e32c5937d1..fa10317620 100644 --- a/modules/ROOT/pages/tinymceai.adoc +++ b/modules/ROOT/pages/tinymceai.adoc @@ -155,6 +155,52 @@ tinymce.init({ }); ---- +[[decoupled-mode]] +== Decoupled mode + +include::partial$misc/admon-requires-8.11v.adoc[] + +By default, AI Chat and AI Review open in an editor sidebar. In decoupled mode, the two apps, AI Chat and AI Review, render inside an element on the page instead, outside the editor. Use decoupled mode to place the AI interface in a panel or layout that the application provides. + +To turn on decoupled mode, set xref:#tinymceai_decoupled_container[`+tinymceai_decoupled_container+`] to a CSS selector that matches one element on the page, and give that element a width and a height. The plugin does not add a border around AI Chat and AI Review in decoupled mode. To separate the apps from the rest of the page, add a border to the element. The border in the example below matches the default editor border. To open AI Chat or AI Review when the editor initializes, set xref:#tinymceai_decoupled_show[`+tinymceai_decoupled_show+`]. + +[source,html] +---- +
+
+ +
+
+
+---- + +[source,js] +---- +tinymce.init({ + selector: 'textarea#editor', // change this value according to the HTML + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_decoupled_container: '#ai-panel', // change this value according to the HTML + tinymceai_decoupled_show: 'tinymceai-chat', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +In decoupled mode: + +* The `+tinymceai-chat+` and `+tinymceai-review+` toolbar buttons and menu items open and close AI Chat and AI Review in the element. +* The xref:#keyboard-shortcuts[keyboard shortcuts], pressed in the editor, open the matching app or move focus to it when it is already open. Pressed inside an open app, the shortcut for that app closes it and returns focus to the editor. +* The element shows one app at a time. When one app opens, the plugin hides the other. +* The plugin keeps the state of a closed app, so reopening AI Chat shows the same conversation. +* When the user switches from one app to the other, the plugin stops any request in progress in the hidden app and discards any pending AI suggestions. +* Chat and review commands, such as `+TinyMCEAIChatPrompt+` and `+TinyMCEAIReviewProofread+`, open the matching app in the element. +* Use the xref:#tinymceai-toggling-apps-decoupled[`+TinyMCEAIToggleApp+`] command and the xref:#tinymceai_decoupled_show[`+tinymceai_decoupled_show+`] option in place of the core `+ToggleSidebar+` command and the xref:customsidebar.adoc#sidebar_show[`+sidebar_show+`] option. + +For a xref:tinymceai-multi-editor.adoc[multi-editor group] in decoupled mode, see xref:tinymceai-multi-editor.adoc#decoupled-mode-group[Grouped editors in decoupled mode]. + [[commands]] == Commands diff --git a/modules/ROOT/partials/commands/tinymceai-cmds.adoc b/modules/ROOT/partials/commands/tinymceai-cmds.adoc index fb7d0e08c4..b794137009 100644 --- a/modules/ROOT/partials/commands/tinymceai-cmds.adoc +++ b/modules/ROOT/partials/commands/tinymceai-cmds.adoc @@ -19,7 +19,59 @@ tinymce.activeEditor.execCommand('ToggleSidebar', false, 'tinymceai-chat'); tinymce.activeEditor.execCommand('ToggleSidebar', false, 'tinymceai-review'); ---- -NOTE: These commands work regardless of xref:tinymceai.adoc#tinymceai_sidebar_type[`tinymceai_sidebar_type`] (`+'static'+` or `+'floating'+`). The `+ToggleSidebar+` event and `+queryCommandValue('ToggleSidebar')+` also behave the same for both sidebar types. +NOTE: These commands work regardless of xref:tinymceai.adoc#tinymceai_sidebar_type[`tinymceai_sidebar_type`] (`+'static'+` or `+'floating'+`). The `+ToggleSidebar+` event and `+queryCommandValue('ToggleSidebar')+` also behave the same for both sidebar types. In xref:tinymceai.adoc#decoupled-mode[decoupled mode], use the <> command instead. + +[[tinymceai-toggling-apps-decoupled]] +== Toggling AI Chat and AI Review in decoupled mode + +include::partial$misc/admon-requires-8.11v.adoc[] + +In xref:tinymceai.adoc#decoupled-mode[decoupled mode], the `+TinyMCEAIToggleApp+` command opens or closes AI Chat or AI Review in the element set by xref:tinymceai.adoc#tinymceai_decoupled_container[`+tinymceai_decoupled_container+`]. The plugin registers this command only in decoupled mode. Pass the app identifier as the third argument: + +[cols="1,3",options="header"] +|=== +|Value |Effect +|`+'tinymceai-chat'+` |Opens AI Chat, or closes it when it is already open. +|`+'tinymceai-review'+` |Opens AI Review, or closes it when it is already open. +|Any other value |Does nothing. The value is case sensitive, so a missing value, an empty string, an unknown identifier, or different capitalization has no effect. +|=== + +`+queryCommandValue('TinyMCEAIToggleApp')+` returns the identifier of the open app, or an empty string when neither app is open. It is the decoupled mode equivalent of `+queryCommandValue('ToggleSidebar')+`. + +Each time `+TinyMCEAIToggleApp+` runs with a valid value, the editor fires a `+TinyMCEAIToggleApp+` event, whether the command opens, closes, or switches an app. The event has no data. To read the new state, call `+queryCommandValue('TinyMCEAIToggleApp')+` in the event handler. The editor does not fire the event for the app opened by xref:tinymceai.adoc#tinymceai_decoupled_show[`+tinymceai_decoupled_show+`]. + +In a xref:tinymceai-multi-editor.adoc[multi-editor group], the plugin registers the command and fires the event on the first editor created in the group. Run the command, query the value, and listen for the event on that editor. + +.Examples +[source,js] +---- +// Open AI Review, or close it if it is already open +tinymce.activeEditor.execCommand('TinyMCEAIToggleApp', false, 'tinymceai-review'); + +// Returns 'tinymceai-chat', 'tinymceai-review', or '' when neither app is open +tinymce.activeEditor.queryCommandValue('TinyMCEAIToggleApp'); +---- + +.Example: showing an application panel only while an app is open +[source,js] +---- +tinymce.init({ + selector: 'textarea', // change this value according to the HTML + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_decoupled_container: '#ai-panel', // change this value according to the HTML + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + }, + setup: (editor) => { + editor.on('TinyMCEAIToggleApp', () => { + const openApp = editor.queryCommandValue('TinyMCEAIToggleApp'); + document.querySelector('#ai-panel').classList.toggle('is-open', openApp !== ''); + }); + } +}); +---- [[tinymceai-plugin-commands]] == TinyMCE AI plugin commands @@ -94,6 +146,22 @@ tinymce.activeEditor.execCommand('TinyMCEAIReviewProofread'); tinymce.activeEditor.execCommand('TinyMCEAIReviewToneProfessional'); ---- +[[tinymceai-preview-state]] +=== Checking for an open preview + +include::partial$misc/admon-requires-8.11v.adoc[] + +`+queryCommandState('TinyMCEAIPreview')+` returns `+true+` when the editor shows a preview of AI suggestions that the user has not yet resolved, and `+false+` otherwise. A preview that is still loading does not count, and the state returns to `+false+` after the user applies or discards the suggestions. + +In a xref:tinymceai-multi-editor.adoc[multi-editor group], each editor reports only its own preview. To check whether any editor in a group shows a preview, query each editor in the group. + +[source,js] +---- +if (tinymce.activeEditor.queryCommandState('TinyMCEAIPreview')) { + console.log('The editor has AI suggestions to resolve.'); +} +---- + [[tinymceai-review-custom-values]] === Values for `+TinyMCEAIReviewCustom+` diff --git a/modules/ROOT/partials/configuration/tinymceai_options.adoc b/modules/ROOT/partials/configuration/tinymceai_options.adoc index de47fe6964..56375d93af 100644 --- a/modules/ROOT/partials/configuration/tinymceai_options.adoc +++ b/modules/ROOT/partials/configuration/tinymceai_options.adoc @@ -152,6 +152,74 @@ tinymce.init({ Changing this property dynamically (after the editor has been initialized) is not supported and can result in unpredictable behavior. ==== +[[tinymceai_decoupled_container]] +=== `+tinymceai_decoupled_container+` + +include::partial$misc/admon-requires-8.11v.adoc[] + +Turns on xref:tinymceai.adoc#decoupled-mode[decoupled mode]. The value is a CSS selector that must match exactly one element on the page. AI Chat and AI Review render inside that element instead of in an editor sidebar. + +When this option is set, the plugin registers no AI sidebars and ignores the xref:tinymceai.adoc#tinymceai_sidebar_type[`+tinymceai_sidebar_type+`] option. When the selector matches no element, matches more than one element, or is not a valid CSS selector, {productname} logs a warning to the browser console and the plugin does not render AI Chat or AI Review. + +The element must be on the page when the editor initializes. When the editor is removed, the plugin removes AI Chat and AI Review from the element, and the element stays on the page. + +For grouped editors, see xref:tinymceai-multi-editor.adoc#decoupled-mode-group[Grouped editors in decoupled mode]. + +*Type:* `+String+` + +*Default value:* `+undefined+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', // change this value according to the HTML + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_decoupled_container: '#ai-panel', // change this value according to the HTML + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[NOTE] +==== +Set this option in the initial configuration of the editor. Changing this option after the editor initializes is not supported. +==== + +[[tinymceai_decoupled_show]] +=== `+tinymceai_decoupled_show+` + +include::partial$misc/admon-requires-8.11v.adoc[] + +Opens AI Chat or AI Review in the element set by xref:tinymceai.adoc#tinymceai_decoupled_container[`+tinymceai_decoupled_container+`] when the editor initializes. This option is the decoupled mode equivalent of the core xref:customsidebar.adoc#sidebar_show[`+sidebar_show+`] option. + +The value is case insensitive. When the value is not valid, {productname} logs a warning to the browser console and the plugin opens neither app. The plugin ignores this option when `+tinymceai_decoupled_container+` is not set. + +*Type:* `+String+` + +*Possible values:* `+'tinymceai-chat'+`, `+'tinymceai-review'+` + +*Default value:* `+undefined+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', // change this value according to the HTML + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_decoupled_container: '#ai-panel', // change this value according to the HTML + tinymceai_decoupled_show: 'tinymceai-chat', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + [[tinymceai_default_model]] === `+tinymceai_default_model+` @@ -370,9 +438,9 @@ Each item in the array is one of the following: * A `+String+`, or an object with a `+text+` property (`+{ text: 'string' }+`), shown as descriptive text. * An action object, shown as a clickable button, with the following properties: ** `+title+` (`+String+`): The label shown on the button. -** `+command+` (`+String+`): The editor command run when the button is selected. The command runs without moving focus into the editor, so the editor scroll position is preserved. This can be a Quick Action or Chat command, the core `+ToggleSidebar+` command, or any other registered editor command, such as `+Bold+`. For the AI command names, see xref:editor-command-identifiers.adoc#tinymceai[TinyMCE AI]. -** `+value+` (optional): The argument passed to the command. The accepted value matches the command, for example a language label for `+TinyMCEAIQuickActionTranslate+`, a `+{ prompt, displayedPrompt }+` object for `+TinyMCEAIChatPrompt+`, or a sidebar name such as `+'tinymceai-review'+` for `+ToggleSidebar+`. -** `+icon+` (optional `+String+`): The name of the icon shown on the button, using any editor icon identifier. When omitted, an icon is selected automatically based on the command. +** `+command+` (`+String+`): The editor command run when the button is selected. The command runs without moving focus into the editor, so the editor scroll position is preserved. This can be a Quick Action or Chat command, the core `+ToggleSidebar+` command (or `+TinyMCEAIToggleApp+` in xref:tinymceai.adoc#decoupled-mode[decoupled mode]), or any other registered editor command, such as `+Bold+`. For the AI command names, see xref:editor-command-identifiers.adoc#tinymceai[TinyMCE AI]. +** `+value+` (optional): The argument passed to the command. The accepted value matches the command, for example a language label for `+TinyMCEAIQuickActionTranslate+`, a `+{ prompt, displayedPrompt }+` object for `+TinyMCEAIChatPrompt+`, or an identifier such as `+'tinymceai-review'+` for `+ToggleSidebar+` or `+TinyMCEAIToggleApp+`. +** `+icon+` (optional `+String+`): The name of the icon shown on the button, using any editor icon identifier. When omitted, an icon is selected automatically based on the command. For a `+ToggleSidebar+` action, the automatic icon matches the sidebar. For a `+TinyMCEAIToggleApp+` action, set `+icon+`, for example to `+'ai-review'+`, because the automatic icon does not match the app. Text items and action buttons can be interleaved to group related actions under short headings. @@ -902,7 +970,7 @@ include::partial$misc/admon-requires-8.10v.adoc[] [[tinymceai_group]] === `+tinymceai_group+` -Adds the editor to a named group. Editors on the same page with the same `+tinymceai_group+` value share one Chat sidebar and one Review sidebar. In a group, Chat, Review, and Quick Actions work across the content of every editor. The editor created first in the group hosts the shared sidebars. +Adds the editor to a named group. Editors on the same page with the same `+tinymceai_group+` value share one Chat sidebar and one Review sidebar. In a group, Chat, Review, and Quick Actions work across the content of every editor. The editor created first in the group hosts the shared sidebars, or the shared AI Chat and AI Review in xref:tinymceai.adoc#decoupled-mode[decoupled mode]. The plugin uses the group name only to match editors, and never shows the name to users or sends it to the AI service. A page can contain several independent groups, each with a different name. Editors in one group never receive content from another group. diff --git a/modules/ROOT/partials/misc/admon-requires-8.11v.adoc b/modules/ROOT/partials/misc/admon-requires-8.11v.adoc new file mode 100644 index 0000000000..82c489b10e --- /dev/null +++ b/modules/ROOT/partials/misc/admon-requires-8.11v.adoc @@ -0,0 +1 @@ +NOTE: This feature is only available for {productname} 8.11 and later. From 4fe4f079bf2fd95912fc78185fd402156dd96da5 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Wed, 18 Nov 2026 20:17:41 +1000 Subject: [PATCH 2/6] TINYDOC-3583: Restore the HR hiring pack multi-editor demo with the decoupled panel, and clip decoupled panel content to its rounded border. --- .../tinymceai-multi-editor-groups/index.html | 4 +- .../tinymceai-multi-editor/example.js | 70 ++++++++++++---- .../tinymceai-multi-editor/index.html | 84 ++++++------------- .../tinymceai-multi-editor/index.js | 75 +++++++++++++---- .../ROOT/pages/tinymceai-multi-editor.adoc | 10 +-- modules/ROOT/pages/tinymceai.adoc | 2 +- 6 files changed, 142 insertions(+), 103 deletions(-) diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.html b/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.html index 6d0b259da9..a99124eb07 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.html +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor-groups/index.html @@ -25,7 +25,7 @@

Key Benefits of Integrated AI

-
+
@@ -81,7 +81,7 @@

Overcoming Adoption Challenges

Furthermore, technical teams must focus on the "integrator" experience. Providing developers with straightforward APIs and pre-built UI components ensures that these advanced features can be deployed quickly without the risk of building complex AI infrastructure from scratch. As we look toward the future, the goal is simple: technology that fades into the background, empowering creators to do their best work with less friction.

-
+
diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js index 808356963e..f7368251b0 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js @@ -1,20 +1,47 @@ // Open-source plugins below are only for editing the demo HTML (lists, links, tables). TinyMCE AI options are the focus. // Share one TinyMCE AI configuration between every editor in the group. const sharedSettings = { - height: '400px', plugins: ['tinymceai', 'advlist', 'lists', 'link', 'autolink', 'table', 'wordcount'], - toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic | bullist numlist | link', + toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic underline | bullist numlist | link table', + menubar: false, // Decoupled mode: AI Chat and AI Review render in the panel next to the editors instead of in a sidebar. tinymceai_decoupled_container: '#tinymceai-multi-editor-panel', tinymceai_decoupled_show: 'tinymceai-chat', - tinymceai_chat_welcome_message: '

Welcome to TinyMCE AI. Pick an action below or type your own prompt.

', + tinymceai_chat_welcome_message: '

Hi! I’m your writing assistant.

I can read and write across all three sections of this hiring pack — refine the role, generate interview questions, or draft notes for HR.

', + // Every welcome action uses the empty 'no-icon' icon registered in setup, so the buttons show text only. tinymceai_chat_welcome_actions: [ - { text: 'Here are some actions to get started:' }, - { title: 'Summarize the document', command: 'TinyMCEAIQuickActionsSummarize' }, - { title: 'Continue writing', command: 'TinyMCEAIQuickActionContinueWriting' }, - { title: 'Translate to Spanish', command: 'TinyMCEAIQuickActionTranslate', value: 'spanish' }, - { title: 'Review my document', command: 'TinyMCEAIToggleApp', value: 'tinymceai-review', icon: 'ai-review' } + { text: '**Try one of these:**' }, + { + title: 'Suggest more interview questions', + command: 'TinyMCEAIChatPrompt', + value: { + prompt: 'Based on the Role description, suggest three or four more interview questions and add them to the end of the numbered list in the Interview questions section. Match the style of the existing questions.', + displayedPrompt: 'Suggest more interview questions' + }, + icon: 'no-icon' + }, + { + title: 'Draft notes for HR', + command: 'TinyMCEAIChatPrompt', + value: { + prompt: 'Based on the Role description and the Interview questions, draft additional notes for HR about scheduling and running the interviews for this role, and add them to the Notes for HR section.', + displayedPrompt: 'Draft notes for HR' + }, + icon: 'no-icon' + }, + { + title: 'Flag any unclear or biased wording', + command: 'TinyMCEAIChatPrompt', + value: { + prompt: 'Check all three sections of this hiring pack for unclear or biased wording. For each phrase, explain the problem and suggest clearer, more inclusive wording.', + displayedPrompt: 'Flag any unclear or biased wording' + }, + icon: 'no-icon' + } ], + setup: (editor) => { + editor.ui.registry.addIcon('no-icon', ''); + }, tinymceai_token_provider: async () => { return fetch('/api/token', { credentials: 'include' }) .then(resp => resp.text()) @@ -61,16 +88,27 @@ const sharedSettings = { tinymce.init({ ...sharedSettings, - selector: 'textarea#tinymceai-multi-editor-introduction', - tinymceai_group: 'article', - tinymceai_document_name: 'Introduction', - tinymceai_document_description: 'The introduction of the article. A title, a short paragraph that sets out the topic, and a figure.' + selector: 'textarea#tinymceai-multi-editor-role-description', + height: '270px', + tinymceai_group: 'hiring-pack', + tinymceai_document_name: 'Role description', + tinymceai_document_description: 'The job advert for the role: the job title and location, what the role involves, and the requirements for candidates.' +}); + +tinymce.init({ + ...sharedSettings, + selector: 'textarea#tinymceai-multi-editor-interview-questions', + height: '340px', + tinymceai_group: 'hiring-pack', + tinymceai_document_name: 'Interview questions', + tinymceai_document_description: 'The interview guide for the role: a heading followed by a numbered list of interview questions.' }); tinymce.init({ ...sharedSettings, - selector: 'textarea#tinymceai-multi-editor-body', - tinymceai_group: 'article', - tinymceai_document_name: 'Body', - tinymceai_document_description: 'The main body of the article. Uses h2 and h3 subheadings, short paragraphs, a bulleted list, and a comparison table.' + selector: 'textarea#tinymceai-multi-editor-notes-for-hr', + height: '260px', + tinymceai_group: 'hiring-pack', + tinymceai_document_name: 'Notes for HR', + tinymceai_document_description: 'Notes for the HR team about scheduling and running the hiring process for the role.' }); diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html index f1e1be93b6..0b3393ad55 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html @@ -1,67 +1,31 @@ -

Introduction (first editor in the group)

+ + +

Role description

- + +

Interview questions

+ -

Body (second editor in the group)

-
-
+
diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js index 9c1fbb4549..1e784fe908 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js @@ -48,24 +48,51 @@ const createRevisionHistoryFetch = (selector) => () => { // Share one TinyMCE AI configuration between every editor in the group. const sharedSettings = { - height: '400px', plugins: [ 'autolink', 'link', 'emoticons', 'lists', 'table', 'advlist', 'searchreplace', 'wordcount', 'autocorrect', 'tinymcespellchecker', 'charmap', 'fullscreen', 'advcode', 'accordion', 'anchor', 'footnotes', 'powerpaste', 'importword', 'exportpdf', 'exportword', 'markdown', 'a11ychecker', 'typography', 'casechange', 'checklist', 'advtable', 'formatpainter', 'permanentpen', 'tableofcontents', 'help', 'math', 'linkchecker', 'media', 'mediaembed', 'quickbars', 'tinymceai', 'tinycomments', 'mentions', 'revisionhistory', 'suggestededits', 'uploadcare' ], - toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic | bullist numlist | link', + toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate spellchecker | styles | bold italic underline forecolor backcolor casechange | link uploadcare table addcomment | align bullist numlist checklist removeformat | code fullscreen help', + menubar: false, // Decoupled mode: AI Chat and AI Review render in the panel next to the editors instead of in a sidebar. tinymceai_decoupled_container: '#tinymceai-multi-editor-panel', tinymceai_decoupled_show: 'tinymceai-chat', quickbars_selection_toolbar: 'tinymceai-quickactions addcomment', - tinymceai_chat_welcome_message: '

Welcome to TinyMCE AI. Pick an action below or type your own prompt.

', + tinymceai_chat_welcome_message: '

Hi! I’m your writing assistant.

I can read and write across all three sections of this hiring pack — refine the role, generate interview questions, or draft notes for HR.

', + // Every welcome action uses the empty 'no-icon' icon registered in setup, so the buttons show text only. tinymceai_chat_welcome_actions: [ - { text: 'Here are some actions to get started:' }, - { title: 'Summarize the document', command: 'TinyMCEAIQuickActionsSummarize' }, - { title: 'Continue writing', command: 'TinyMCEAIQuickActionContinueWriting' }, - { title: 'Translate to Spanish', command: 'TinyMCEAIQuickActionTranslate', value: 'spanish' }, - { title: 'Review my document', command: 'TinyMCEAIToggleApp', value: 'tinymceai-review', icon: 'ai-review' } + { text: '**Try one of these:**' }, + { + title: 'Suggest more interview questions', + command: 'TinyMCEAIChatPrompt', + value: { + prompt: 'Based on the Role description, suggest three or four more interview questions and add them to the end of the numbered list in the Interview questions section. Match the style of the existing questions.', + displayedPrompt: 'Suggest more interview questions' + }, + icon: 'no-icon' + }, + { + title: 'Draft notes for HR', + command: 'TinyMCEAIChatPrompt', + value: { + prompt: 'Based on the Role description and the Interview questions, draft additional notes for HR about scheduling and running the interviews for this role, and add them to the Notes for HR section.', + displayedPrompt: 'Draft notes for HR' + }, + icon: 'no-icon' + }, + { + title: 'Flag any unclear or biased wording', + command: 'TinyMCEAIChatPrompt', + value: { + prompt: 'Check all three sections of this hiring pack for unclear or biased wording. For each phrase, explain the problem and suggest clearer, more inclusive wording.', + displayedPrompt: 'Flag any unclear or biased wording' + }, + icon: 'no-icon' + } ], + setup: (editor) => { + editor.ui.registry.addIcon('no-icon', ''); + }, toolbar_mode: 'sliding', visual: false, images_file_types: 'jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp,svg', @@ -130,18 +157,30 @@ const sharedSettings = { tinymce.init({ ...sharedSettings, - selector: 'textarea#tinymceai-multi-editor-introduction', - revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-introduction'), - tinymceai_group: 'article', - tinymceai_document_name: 'Introduction', - tinymceai_document_description: 'The introduction of the article. A title, a short paragraph that sets out the topic, and a figure.' + selector: 'textarea#tinymceai-multi-editor-role-description', + height: '270px', + revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-role-description'), + tinymceai_group: 'hiring-pack', + tinymceai_document_name: 'Role description', + tinymceai_document_description: 'The job advert for the role: the job title and location, what the role involves, and the requirements for candidates.' +}); + +tinymce.init({ + ...sharedSettings, + selector: 'textarea#tinymceai-multi-editor-interview-questions', + height: '340px', + revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-interview-questions'), + tinymceai_group: 'hiring-pack', + tinymceai_document_name: 'Interview questions', + tinymceai_document_description: 'The interview guide for the role: a heading followed by a numbered list of interview questions.' }); tinymce.init({ ...sharedSettings, - selector: 'textarea#tinymceai-multi-editor-body', - revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-body'), - tinymceai_group: 'article', - tinymceai_document_name: 'Body', - tinymceai_document_description: 'The main body of the article. Uses h2 and h3 subheadings, short paragraphs, a bulleted list, and a comparison table.' + selector: 'textarea#tinymceai-multi-editor-notes-for-hr', + height: '260px', + revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-notes-for-hr'), + tinymceai_group: 'hiring-pack', + tinymceai_document_name: 'Notes for HR', + tinymceai_document_description: 'Notes for the HR team about scheduling and running the hiring process for the role.' }); diff --git a/modules/ROOT/pages/tinymceai-multi-editor.adoc b/modules/ROOT/pages/tinymceai-multi-editor.adoc index c8688944f3..db1dc8c824 100644 --- a/modules/ROOT/pages/tinymceai-multi-editor.adoc +++ b/modules/ROOT/pages/tinymceai-multi-editor.adoc @@ -8,14 +8,12 @@ include::partial$misc/admon-requires-8.10v.adoc[] -Multi-editor mode groups several {productname} editors on the same page so that they share one Chat sidebar and one Review sidebar. Use multi-editor mode when a page splits related content across several editors, for example a form with separate editors for a summary and a body, or a page that edits several related articles side by side. - -In a group, Chat, Review, and Quick Actions work across the content of every editor. The {pluginname} plugin identifies the content of each editor by name, and previews and applies each change in the editor it belongs to. +Multi-editor mode groups several {productname} editors on one page, such as the sections of a form, so that they share one Chat sidebar and one Review sidebar. Chat, Review, and Quick Actions work across the content of every editor in the group. [[demo]] == Demo -The demo below splits an article across an Introduction editor and a Body editor in one group. The group uses xref:tinymceai.adoc#decoupled-mode[decoupled mode], so AI Chat and AI Review open in a panel next to the editors, and AI Chat opens when the page loads. Select the image:icons-premium/ai-assistant.svg[Chat icon,24px] Chat or image:icons-premium/ai-review.svg[Review icon,24px] Review toolbar button in either editor to open and close the apps in the panel. Then ask the AI to change both parts of the article, or run a review over both editors. +The demo below groups the three sections of a hiring pack. The group uses xref:tinymceai.adoc#decoupled-mode[decoupled mode], so AI Chat and AI Review open in a panel next to the editors, and AI Chat opens when the demo loads. Select a suggested action, or run a review across all three editors. liveDemo::tinymceai-multi-editor[] @@ -75,7 +73,7 @@ While the {pluginname} plugin previews changes from Chat or Quick Actions, each With the floating sidebar, when any editor in the group has pending suggestions, the {pluginname} plugin asks for confirmation before it discards them and starts a different AI task. For example, the confirmation dialog appears when the user switches between the Chat sidebar and the Review sidebar, or runs a Quick Action while a review has pending suggestions. -If the user confirms, the plugin discards the pending suggestions in every editor of the group and returns each editor to normal editing. If the user cancels, the plugin keeps every preview and pending suggestion. +If the user confirms, the plugin discards the suggestions in every editor of the group, resets the changes already applied, and returns each editor to normal editing. If the user cancels, the plugin keeps every preview and pending suggestion. [[integration]] == Integration @@ -132,7 +130,7 @@ To use xref:tinymceai.adoc#decoupled-mode[decoupled mode] with a group, add one -
+
---- diff --git a/modules/ROOT/pages/tinymceai.adoc b/modules/ROOT/pages/tinymceai.adoc index fa10317620..833cebc427 100644 --- a/modules/ROOT/pages/tinymceai.adoc +++ b/modules/ROOT/pages/tinymceai.adoc @@ -170,7 +170,7 @@ To turn on decoupled mode, set xref:#tinymceai_decoupled_container[`+tinymceai_d
-
+
---- From fc74e8b910fc64882672ed6f24430ee8b76a29dd Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Thu, 19 Nov 2026 08:32:22 +1000 Subject: [PATCH 3/6] TINYDOC-3583: Hide the accessibility help text and word count in the multi-editor demo status bar. --- .../ROOT/examples/live-demos/tinymceai-multi-editor/example.js | 3 ++- .../ROOT/examples/live-demos/tinymceai-multi-editor/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js index f7368251b0..58c1fc57db 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js @@ -1,9 +1,10 @@ // Open-source plugins below are only for editing the demo HTML (lists, links, tables). TinyMCE AI options are the focus. // Share one TinyMCE AI configuration between every editor in the group. const sharedSettings = { - plugins: ['tinymceai', 'advlist', 'lists', 'link', 'autolink', 'table', 'wordcount'], + plugins: ['tinymceai', 'advlist', 'lists', 'link', 'autolink', 'table'], toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic underline | bullist numlist | link table', menubar: false, + help_accessibility: false, // Decoupled mode: AI Chat and AI Review render in the panel next to the editors instead of in a sidebar. tinymceai_decoupled_container: '#tinymceai-multi-editor-panel', tinymceai_decoupled_show: 'tinymceai-chat', diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js index 1e784fe908..100f5cc061 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js @@ -49,11 +49,12 @@ const createRevisionHistoryFetch = (selector) => () => { // Share one TinyMCE AI configuration between every editor in the group. const sharedSettings = { plugins: [ - 'autolink', 'link', 'emoticons', 'lists', 'table', 'advlist', 'searchreplace', 'wordcount', 'autocorrect', 'tinymcespellchecker', 'charmap', 'fullscreen', 'advcode', 'accordion', 'anchor', 'footnotes', 'powerpaste', 'importword', 'exportpdf', 'exportword', 'markdown', 'a11ychecker', 'typography', 'casechange', 'checklist', 'advtable', 'formatpainter', 'permanentpen', 'tableofcontents', 'help', 'math', 'linkchecker', 'media', 'mediaembed', + 'autolink', 'link', 'emoticons', 'lists', 'table', 'advlist', 'searchreplace', 'autocorrect', 'tinymcespellchecker', 'charmap', 'fullscreen', 'advcode', 'accordion', 'anchor', 'footnotes', 'powerpaste', 'importword', 'exportpdf', 'exportword', 'markdown', 'a11ychecker', 'typography', 'casechange', 'checklist', 'advtable', 'formatpainter', 'permanentpen', 'tableofcontents', 'help', 'math', 'linkchecker', 'media', 'mediaembed', 'quickbars', 'tinymceai', 'tinycomments', 'mentions', 'revisionhistory', 'suggestededits', 'uploadcare' ], toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate spellchecker | styles | bold italic underline forecolor backcolor casechange | link uploadcare table addcomment | align bullist numlist checklist removeformat | code fullscreen help', menubar: false, + help_accessibility: false, // Decoupled mode: AI Chat and AI Review render in the panel next to the editors instead of in a sidebar. tinymceai_decoupled_container: '#tinymceai-multi-editor-panel', tinymceai_decoupled_show: 'tinymceai-chat', From 0be16b6c28fc1ee4bb9f810869d8542a83fd6d39 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Thu, 19 Nov 2026 08:54:03 +1000 Subject: [PATCH 4/6] TINYDOC-3583: Reduce the multi-editor demo to two editors and keep the AI panel beside them on wider screens. --- .../tinymceai-multi-editor/example.js | 22 ++---------------- .../tinymceai-multi-editor/index.html | 20 ++++++++-------- .../tinymceai-multi-editor/index.js | 23 ++----------------- .../ROOT/pages/tinymceai-multi-editor.adoc | 2 +- 4 files changed, 16 insertions(+), 51 deletions(-) diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js index 58c1fc57db..ed69220da5 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/example.js @@ -8,7 +8,7 @@ const sharedSettings = { // Decoupled mode: AI Chat and AI Review render in the panel next to the editors instead of in a sidebar. tinymceai_decoupled_container: '#tinymceai-multi-editor-panel', tinymceai_decoupled_show: 'tinymceai-chat', - tinymceai_chat_welcome_message: '

Hi! I’m your writing assistant.

I can read and write across all three sections of this hiring pack — refine the role, generate interview questions, or draft notes for HR.

', + tinymceai_chat_welcome_message: '

Hi! I’m your writing assistant.

I can read and write across both sections of this hiring pack — refine the role or generate interview questions.

', // Every welcome action uses the empty 'no-icon' icon registered in setup, so the buttons show text only. tinymceai_chat_welcome_actions: [ { text: '**Try one of these:**' }, @@ -21,20 +21,11 @@ const sharedSettings = { }, icon: 'no-icon' }, - { - title: 'Draft notes for HR', - command: 'TinyMCEAIChatPrompt', - value: { - prompt: 'Based on the Role description and the Interview questions, draft additional notes for HR about scheduling and running the interviews for this role, and add them to the Notes for HR section.', - displayedPrompt: 'Draft notes for HR' - }, - icon: 'no-icon' - }, { title: 'Flag any unclear or biased wording', command: 'TinyMCEAIChatPrompt', value: { - prompt: 'Check all three sections of this hiring pack for unclear or biased wording. For each phrase, explain the problem and suggest clearer, more inclusive wording.', + prompt: 'Check both sections of this hiring pack for unclear or biased wording. For each phrase, explain the problem and suggest clearer, more inclusive wording.', displayedPrompt: 'Flag any unclear or biased wording' }, icon: 'no-icon' @@ -104,12 +95,3 @@ tinymce.init({ tinymceai_document_name: 'Interview questions', tinymceai_document_description: 'The interview guide for the role: a heading followed by a numbered list of interview questions.' }); - -tinymce.init({ - ...sharedSettings, - selector: 'textarea#tinymceai-multi-editor-notes-for-hr', - height: '260px', - tinymceai_group: 'hiring-pack', - tinymceai_document_name: 'Notes for HR', - tinymceai_document_description: 'Notes for the HR team about scheduling and running the hiring process for the role.' -}); diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html index 0b3393ad55..d788dbe648 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.html @@ -1,11 +1,19 @@

Role description

-
-
+
+
- -

Notes for HR

-
-
+
diff --git a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js index 100f5cc061..63f55f899e 100644 --- a/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js +++ b/modules/ROOT/examples/live-demos/tinymceai-multi-editor/index.js @@ -59,7 +59,7 @@ const sharedSettings = { tinymceai_decoupled_container: '#tinymceai-multi-editor-panel', tinymceai_decoupled_show: 'tinymceai-chat', quickbars_selection_toolbar: 'tinymceai-quickactions addcomment', - tinymceai_chat_welcome_message: '

Hi! I’m your writing assistant.

I can read and write across all three sections of this hiring pack — refine the role, generate interview questions, or draft notes for HR.

', + tinymceai_chat_welcome_message: '

Hi! I’m your writing assistant.

I can read and write across both sections of this hiring pack — refine the role or generate interview questions.

', // Every welcome action uses the empty 'no-icon' icon registered in setup, so the buttons show text only. tinymceai_chat_welcome_actions: [ { text: '**Try one of these:**' }, @@ -72,20 +72,11 @@ const sharedSettings = { }, icon: 'no-icon' }, - { - title: 'Draft notes for HR', - command: 'TinyMCEAIChatPrompt', - value: { - prompt: 'Based on the Role description and the Interview questions, draft additional notes for HR about scheduling and running the interviews for this role, and add them to the Notes for HR section.', - displayedPrompt: 'Draft notes for HR' - }, - icon: 'no-icon' - }, { title: 'Flag any unclear or biased wording', command: 'TinyMCEAIChatPrompt', value: { - prompt: 'Check all three sections of this hiring pack for unclear or biased wording. For each phrase, explain the problem and suggest clearer, more inclusive wording.', + prompt: 'Check both sections of this hiring pack for unclear or biased wording. For each phrase, explain the problem and suggest clearer, more inclusive wording.', displayedPrompt: 'Flag any unclear or biased wording' }, icon: 'no-icon' @@ -175,13 +166,3 @@ tinymce.init({ tinymceai_document_name: 'Interview questions', tinymceai_document_description: 'The interview guide for the role: a heading followed by a numbered list of interview questions.' }); - -tinymce.init({ - ...sharedSettings, - selector: 'textarea#tinymceai-multi-editor-notes-for-hr', - height: '260px', - revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-notes-for-hr'), - tinymceai_group: 'hiring-pack', - tinymceai_document_name: 'Notes for HR', - tinymceai_document_description: 'Notes for the HR team about scheduling and running the hiring process for the role.' -}); diff --git a/modules/ROOT/pages/tinymceai-multi-editor.adoc b/modules/ROOT/pages/tinymceai-multi-editor.adoc index db1dc8c824..9cce0db6f6 100644 --- a/modules/ROOT/pages/tinymceai-multi-editor.adoc +++ b/modules/ROOT/pages/tinymceai-multi-editor.adoc @@ -13,7 +13,7 @@ Multi-editor mode groups several {productname} editors on one page, such as the [[demo]] == Demo -The demo below groups the three sections of a hiring pack. The group uses xref:tinymceai.adoc#decoupled-mode[decoupled mode], so AI Chat and AI Review open in a panel next to the editors, and AI Chat opens when the demo loads. Select a suggested action, or run a review across all three editors. +The demo below groups the two sections of a hiring pack. The group uses xref:tinymceai.adoc#decoupled-mode[decoupled mode], so AI Chat and AI Review open in a panel next to the editors, and AI Chat opens when the demo loads. Select a suggested action, or run a review across both editors. liveDemo::tinymceai-multi-editor[] From d5eb6766c069d58bb1d41efd26386a4cfd6510eb Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Mon, 23 Nov 2026 11:11:51 +1000 Subject: [PATCH 5/6] TINYDOC-3583: Address review feedback on the decoupled mode release note, border note, and decoupled discard behavior. --- modules/ROOT/pages/8.11.0-release-notes.adoc | 4 +--- modules/ROOT/pages/tinymceai-multi-editor.adoc | 2 ++ modules/ROOT/pages/tinymceai.adoc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ROOT/pages/8.11.0-release-notes.adoc b/modules/ROOT/pages/8.11.0-release-notes.adoc index b4e955ce7c..5253fa5a12 100644 --- a/modules/ROOT/pages/8.11.0-release-notes.adoc +++ b/modules/ROOT/pages/8.11.0-release-notes.adoc @@ -87,9 +87,7 @@ In {productname} {release-version}, the new xref:tinymceai.adoc#tinymceai_decoup ==== Added `+tinymceai_decoupled_show+` option to set the initial view // #TINYMCE-15032 -Previously, the core xref:customsidebar.adoc#sidebar_show[`+sidebar_show+`] option could open an AI sidebar when the editor loaded, but no option opened AI Chat or AI Review in decoupled mode. - -In {productname} {release-version}, the new xref:tinymceai.adoc#tinymceai_decoupled_show[`+tinymceai_decoupled_show+`] option opens AI Chat or AI Review in the element set by `+tinymceai_decoupled_container+` when the editor initializes. +In {productname} {release-version}, the new xref:tinymceai.adoc#tinymceai_decoupled_show[`+tinymceai_decoupled_show+`] option opens AI Chat or AI Review in the element set by `+tinymceai_decoupled_container+` when the editor initializes. In decoupled mode, use this option in place of the core xref:customsidebar.adoc#sidebar_show[`+sidebar_show+`] option. ==== New `+TinyMCEAIPreview+` query command state to check whether an editor has a preview of AI suggestions open // #TINYMCE-15033 diff --git a/modules/ROOT/pages/tinymceai-multi-editor.adoc b/modules/ROOT/pages/tinymceai-multi-editor.adoc index 9cce0db6f6..50ed50505d 100644 --- a/modules/ROOT/pages/tinymceai-multi-editor.adoc +++ b/modules/ROOT/pages/tinymceai-multi-editor.adoc @@ -75,6 +75,8 @@ With the floating sidebar, when any editor in the group has pending suggestions, If the user confirms, the plugin discards the suggestions in every editor of the group, resets the changes already applied, and returns each editor to normal editing. If the user cancels, the plugin keeps every preview and pending suggestion. +In xref:tinymceai.adoc#decoupled-mode[decoupled mode], the confirmation dialog does not appear. When the user switches between AI Chat and AI Review, the plugin discards the pending suggestions without asking. + [[integration]] == Integration diff --git a/modules/ROOT/pages/tinymceai.adoc b/modules/ROOT/pages/tinymceai.adoc index 833cebc427..8c4c929993 100644 --- a/modules/ROOT/pages/tinymceai.adoc +++ b/modules/ROOT/pages/tinymceai.adoc @@ -162,7 +162,7 @@ include::partial$misc/admon-requires-8.11v.adoc[] By default, AI Chat and AI Review open in an editor sidebar. In decoupled mode, the two apps, AI Chat and AI Review, render inside an element on the page instead, outside the editor. Use decoupled mode to place the AI interface in a panel or layout that the application provides. -To turn on decoupled mode, set xref:#tinymceai_decoupled_container[`+tinymceai_decoupled_container+`] to a CSS selector that matches one element on the page, and give that element a width and a height. The plugin does not add a border around AI Chat and AI Review in decoupled mode. To separate the apps from the rest of the page, add a border to the element. The border in the example below matches the default editor border. To open AI Chat or AI Review when the editor initializes, set xref:#tinymceai_decoupled_show[`+tinymceai_decoupled_show+`]. +To turn on decoupled mode, set xref:#tinymceai_decoupled_container[`+tinymceai_decoupled_container+`] to a CSS selector that matches one element on the page, and give that element a width and a height. The plugin does not add a border around AI Chat and AI Review in decoupled mode. To separate the apps from the rest of the page, add a border to the element. To open AI Chat or AI Review when the editor initializes, set xref:#tinymceai_decoupled_show[`+tinymceai_decoupled_show+`]. [source,html] ---- From ee4923614773a4b2f1a53ae92702bc48a9e08458 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Mon, 23 Nov 2026 11:34:25 +1000 Subject: [PATCH 6/6] Update antora.yml --- antora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antora.yml b/antora.yml index 19d1029342..bafd9ca548 100644 --- a/antora.yml +++ b/antora.yml @@ -10,7 +10,7 @@ asciidoc: companyurl: https://www.tiny.cloud cdnurl: https://cdn.tiny.cloud/1/no-api-key/tinymce/8/tinymce.min.js tdcdnurl: https://cdn.tiny.cloud/1/_your_api_key_/tinydrive/8/tinydrive.min.js - tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8-dev/tinymce.min.js + tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8/tinymce.min.js tinydrive_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinydrive/8/tinydrive.min.js webcomponent_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-webcomponent/dist/tinymce-webcomponent.min.js jquery_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-jquery@2/dist/tinymce-jquery.min.js