From ebabcc1ad3c96ec9476965329306d15a0a66a87b Mon Sep 17 00:00:00 2001 From: MitchCTiny Date: Fri, 19 Jun 2026 10:59:02 +1000 Subject: [PATCH 1/4] TINYDOC-3537: New Suggested Edits APIs for toggling tracking --- modules/ROOT/partials/commands/suggestededits-cmds.adoc | 4 ++++ modules/ROOT/partials/events/suggestededits-events.adoc | 1 + .../partials/menu-item-ids/suggestededits-menu-items.adoc | 1 + .../toolbar-button-ids/suggestededits-toolbar-buttons.adoc | 1 + 4 files changed, 7 insertions(+) diff --git a/modules/ROOT/partials/commands/suggestededits-cmds.adoc b/modules/ROOT/partials/commands/suggestededits-cmds.adoc index 5ac738e8ff..4a6f353caf 100644 --- a/modules/ROOT/partials/commands/suggestededits-cmds.adoc +++ b/modules/ROOT/partials/commands/suggestededits-cmds.adoc @@ -2,10 +2,14 @@ |=== |Command |Description |suggestededits |Toggles the Suggested Edits view. +|suggestededitsToggleTracking |Toggles the tracking of suggested edits. |=== .Example [source,js] ---- tinymce.activeEditor.execCommand('suggestededits'); +tinymce.activeEditor.execCommand('suggestededitsToggleTracking'); + +tinymce.activeEditor.queryCommandState('suggestededitsToggleTracking'); // Returns true if tracking of suggested edits is enabled, otherwise false. ---- diff --git a/modules/ROOT/partials/events/suggestededits-events.adoc b/modules/ROOT/partials/events/suggestededits-events.adoc index 094c76c1fc..48233cabc1 100644 --- a/modules/ROOT/partials/events/suggestededits-events.adoc +++ b/modules/ROOT/partials/events/suggestededits-events.adoc @@ -7,4 +7,5 @@ The following events are provided by the xref:{plugincode}.adoc[{pluginname} plu |SuggestedEditsReviewComplete |N/A |A review in the Suggested Edits view has been completed. |SuggestedEditsReviewCancelled |N/A |A review in the Suggested Edits view was cancelled. |SuggestedEditsHasChangesUpdate |`+hasChanges+` |The Suggested Edits model is updated. The `+hasChanges+` data is a boolean value indicating whether there are suggestions to review. +|SuggestedEditsTrackingToggle |`+tracking+` |The tracking state of suggested edits has changed. The `+tracking+` data is a boolean value indicating whether edits are being tracked. |=== \ No newline at end of file diff --git a/modules/ROOT/partials/menu-item-ids/suggestededits-menu-items.adoc b/modules/ROOT/partials/menu-item-ids/suggestededits-menu-items.adoc index d45e2420b5..f6c9324b04 100644 --- a/modules/ROOT/partials/menu-item-ids/suggestededits-menu-items.adoc +++ b/modules/ROOT/partials/menu-item-ids/suggestededits-menu-items.adoc @@ -3,4 +3,5 @@ |Menu item identifier |xref:menus-configuration-options.adoc#example-the-tinymce-default-menu-items[Default Menu Location] |Description |`suggestededits` |View |Opens the Suggested Edits view. +|`suggestededits-tracking` |_Not Applicable_ |Toggles the tracking of suggested edits. |=== \ No newline at end of file diff --git a/modules/ROOT/partials/toolbar-button-ids/suggestededits-toolbar-buttons.adoc b/modules/ROOT/partials/toolbar-button-ids/suggestededits-toolbar-buttons.adoc index 83f8b4fb4c..7d766a3c2b 100644 --- a/modules/ROOT/partials/toolbar-button-ids/suggestededits-toolbar-buttons.adoc +++ b/modules/ROOT/partials/toolbar-button-ids/suggestededits-toolbar-buttons.adoc @@ -4,4 +4,5 @@ |`+suggestededits+` |Opens the Review edits view. |`+suggestededits-label+` |Opens the Review edits view (this button uses text instead of an icon). +|`+suggestededits-tracking+` |Toggles the tracking of suggested edits. |=== \ No newline at end of file From f65f6f693bf42bfb0811107ff43a53debc264795 Mon Sep 17 00:00:00 2001 From: MitchCTiny Date: Mon, 22 Jun 2026 15:09:33 +1000 Subject: [PATCH 2/4] TINYDOC-3537: Update demos and option docs --- .../examples/live-demos/suggestededits-auto-approve/index.js | 2 +- modules/ROOT/examples/live-demos/suggestededits/index.js | 2 +- .../partials/configuration/suggestededits_auto_approve.adoc | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/examples/live-demos/suggestededits-auto-approve/index.js b/modules/ROOT/examples/live-demos/suggestededits-auto-approve/index.js index d0885abd23..c555ac1526 100644 --- a/modules/ROOT/examples/live-demos/suggestededits-auto-approve/index.js +++ b/modules/ROOT/examples/live-demos/suggestededits-auto-approve/index.js @@ -7,7 +7,7 @@ tinymce.init({ selector: 'textarea#suggestededits-auto-approve', height: 500, plugins: 'suggestededits advlist anchor autolink code charmap emoticons fullscreen help image link lists media preview searchreplace table', - toolbar: 'undo redo | suggestededits | styles fontsizeinput | bold italic | align bullist numlist | table link image | code', + toolbar: 'undo redo | suggestededits suggestededits-tracking | styles fontsizeinput | bold italic | align bullist numlist | table link image | code', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }', suggestededits_model: model, diff --git a/modules/ROOT/examples/live-demos/suggestededits/index.js b/modules/ROOT/examples/live-demos/suggestededits/index.js index e38391b3ba..cdfc9f46c7 100644 --- a/modules/ROOT/examples/live-demos/suggestededits/index.js +++ b/modules/ROOT/examples/live-demos/suggestededits/index.js @@ -7,7 +7,7 @@ tinymce.init({ selector: 'textarea#suggestededits', height: 500, plugins: 'suggestededits advlist anchor autolink code charmap emoticons fullscreen help image link lists media preview searchreplace table', - toolbar: 'undo redo | suggestededits | styles fontsizeinput | bold italic | align bullist numlist | table link image | code', + toolbar: 'undo redo | suggestededits suggestededits-tracking | styles fontsizeinput | bold italic | align bullist numlist | table link image | code', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }', suggestededits_model: model, diff --git a/modules/ROOT/partials/configuration/suggestededits_auto_approve.adoc b/modules/ROOT/partials/configuration/suggestededits_auto_approve.adoc index 928ddd7358..1b903a26a0 100644 --- a/modules/ROOT/partials/configuration/suggestededits_auto_approve.adoc +++ b/modules/ROOT/partials/configuration/suggestededits_auto_approve.adoc @@ -8,6 +8,7 @@ When set to: * `false`: All edits require manual approval before being applied. * `true`: All new edits are automatically approved and applied. +NOTE: In {productname} 8.7, this option controls the default state of the `suggestededits-tracking` toolbar button and menu item. When set to `false`, the `suggestededits-tracking` button will be active by default, allowing edits to be automatically approved. When set to `true`, the button will be inactive by default, requiring manual approval for edits. Toggling the button or menu item will override the default state set by this option for the current session. *Type:* `+Boolean+` @@ -19,7 +20,7 @@ When set to: tinymce.init({ selector: 'textarea#suggestededits', // Change this value according to your HTML plugins: 'suggestededits', - toolbar: 'suggestededits', + toolbar: 'suggestededits suggestededits-tracking', suggestededits_auto_approve: true, // Change this value to auto-approve suggested edits }); ---- From d31127293147b1473d655cd267f02a1c9959bc92 Mon Sep 17 00:00:00 2001 From: MitchCTiny Date: Mon, 22 Jun 2026 15:59:30 +1000 Subject: [PATCH 3/4] TINYDOC-3537: Apply suggestion --- .../partials/configuration/suggestededits_auto_approve.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/partials/configuration/suggestededits_auto_approve.adoc b/modules/ROOT/partials/configuration/suggestededits_auto_approve.adoc index 1b903a26a0..f9b560aa40 100644 --- a/modules/ROOT/partials/configuration/suggestededits_auto_approve.adoc +++ b/modules/ROOT/partials/configuration/suggestededits_auto_approve.adoc @@ -8,7 +8,7 @@ When set to: * `false`: All edits require manual approval before being applied. * `true`: All new edits are automatically approved and applied. -NOTE: In {productname} 8.7, this option controls the default state of the `suggestededits-tracking` toolbar button and menu item. When set to `false`, the `suggestededits-tracking` button will be active by default, allowing edits to be automatically approved. When set to `true`, the button will be inactive by default, requiring manual approval for edits. Toggling the button or menu item will override the default state set by this option for the current session. +NOTE: In {productname} 8.7, this option controls the default state of the `suggestededits-tracking` toolbar button and menu item. When set to `false`, the `suggestededits-tracking` button will be active by default and edits will appear in the review. When set to `true`, the button will be inactive by default, meaning edits will not appear in the review. Toggling the button or menu item will override the default state set by this option for the current session. *Type:* `+Boolean+` From d4de1c67d8cea0b7bb1397359ea25242f0f13fca Mon Sep 17 00:00:00 2001 From: MitchCTiny Date: Fri, 26 Jun 2026 16:47:58 +1000 Subject: [PATCH 4/4] TINYDOC-3537: Add release note --- modules/ROOT/pages/8.7.0-release-notes.adoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/8.7.0-release-notes.adoc b/modules/ROOT/pages/8.7.0-release-notes.adoc index b5d8bc15cc..656780ad44 100644 --- a/modules/ROOT/pages/8.7.0-release-notes.adoc +++ b/modules/ROOT/pages/8.7.0-release-notes.adoc @@ -86,7 +86,13 @@ Suggested Edits now records edits made with the xref:tinymceai.adoc[{productname The `+suggestededits_model+` schema is now version 2. Models saved with version 1 are migrated automatically when loaded. -==== Suggested Edits API should not be tied to the existence of the suggested edits toolbar button +==== Tracking suggestions can now be toggled + +Suggested Edits now supports toggling suggestion tracking while editing. The new `+suggestededits-tracking+` xref:suggestededits.adoc#toolbar-buttons[toolbar button] and xref:suggestededits.adoc#menu-items[menu item], along with the `+SuggestedEditsToggleTracking+` xref:suggestededits.adoc#commands[command], let users switch between tracking edits as suggestions or applying them directly to the content. The xref:suggestededits.adoc#suggestededits_auto_approve[`+suggestededits_auto_approve+`] configuration option now also controls their default state. + +Because toggling tracking fundamentally changes the Suggested Edits experience, the button and menu item are not included by default. They must be explicitly added to the toolbar or menu in the editor configuration. + +==== Suggested Edits `hasChanges` event now also fires when a review completes // #TINYMCE-13256 Previously, the `SuggestedEditsHasChangesUpdate` event only fired alongside other editor events, such as typing, selecting, or focusing. Completing a review did not fire the event on its own, so the value returned by the `hasChanges` API could become outdated. As a result, any integration that relied upon the API would not receive an update when a review finished.