Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<textarea id="suggestededits" suggestededits-model='{"history":{"2":[{"id":1,"uid":"james-wilson","timestamp":1752576936000,"feedback":"Nice improvement!"}]},"version":1,"contents":[{"type":"p","children":[{"type":"img","attrs":{"style":"display: block; margin-left: auto; margin-right: auto;","title":"Tiny Logo","src":"https://www.tiny.cloud/docs/tinymce/latest/_images/logos/android-chrome-256x256.png","alt":"TinyMCE Logo","width":"128","height":"128"}}]},{"type":"h2","attrs":{"style":"text-align: center;"},"children":[{"text":"Welcome to the TinyMCE Suggested Edits "},{"text":"interactive ","opData":{"id":1,"type":"insert","uid":"alex-thompson","timestamp":1752015064000}},{"text":"demo!"}]},{"type":"p","attrs":{"style":"text-align: center;"},"children":[{"text":"Try out the Suggested Edits feature"},{"text":": type in the editor, apply formatting or delete some content. T","opData":{"id":2,"type":"insert","uid":"alex-thompson","timestamp":1752415064000}},{"text":" by typing in the editor and t","opData":{"id":2,"type":"remove","uid":"alex-thompson","timestamp":1752415064000}},{"text":"hen"},{"text":",","opData":{"id":3,"type":"insert","uid":"alex-thompson","timestamp":1752515064000}},{"text":" click"},{"text":"ing","opData":{"id":4,"type":"remove","uid":"alex-thompson","timestamp":1752515064000}},{"text":" the Review Changes button in the toolbar"},{"text":" to see your changes","opData":{"id":5,"type":"insert","uid":"kai-nakamura","timestamp":1752615064000}},{"text":"."}]},{"type":"p","attrs":{"style":"text-align: center;"},"children":[{"text":"And visit the "},{"text":"pricing page","opData":{"id":6,"type":"modify","uid":"kai-nakamura","timestamp":1752615064000},"format":[{"type":"a","attrs":{"href":"https://www.tiny.cloud/pricing"}}],"oldFormat":[{"type":"a","attrs":{"href":"https://www.tiny.cloud/pricing"}},"em"]},{"text":" to learn more about our Premium plugins."}]},{"type":"h2","children":[{"text":"A simple table to play with"}]},{"type":"table","attrs":{"style":"border-collapse: collapse; width: 100%;","border":"1"},"children":[{"type":"thead","children":[{"type":"tr","attrs":{"style":"text-align: left;"},"children":[{"type":"th","children":[{"text":"Product"}]},{"type":"th","children":[{"text":"Cost"}]},{"type":"th","children":[{"text":"Really?"}]}]}]},{"type":"tbody","children":[{"type":"tr","children":[{"type":"td","attrs":{"style":"text-align: center;"},"children":[{"text":"TinyMCE Cloud"}]},{"type":"td","attrs":{"style":"text-align: center;"},"children":[{"text":"Get started for free"}]},{"type":"td","attrs":{"style":"text-align: center;"},"children":[{"text":"Yes!","format":["strong"]}]}]}]}]},{"type":"h2","opData":{"id":7,"type":"insert","uid":"mia-andersson","timestamp":1752576331000},"children":[{"text":"Found a bug?"}]},{"type":"p","children":[{"text":" ","opData":{"id":7,"type":"remove","uid":"mia-andersson","timestamp":1752576331000}},{"text":"If you believe you have found a bug please create an issue on the ","opData":{"id":7,"type":"insert","uid":"mia-andersson","timestamp":1752576331000}},{"text":"GitHub repo","opData":{"id":7,"type":"insert","uid":"mia-andersson","timestamp":1752576331000},"format":[{"type":"a","attrs":{"href":"https://github.com/tinymce/tinymce/issues"}}]},{"text":" to report it to the developers.","opData":{"id":7,"type":"insert","uid":"mia-andersson","timestamp":1752576331000}}]},{"type":"h2","children":[{"text":"Finally…"}]},{"type":"p","children":[{"text":"Need file uploads in your app? Consider using "},{"text":"Uploadcare","format":[{"type":"a","attrs":{"href":"https://www.tiny.cloud/docs/tinymce/latest/uploadcare/","target":"_blank","rel":"noopener noreferrer"}}]},{"text":" with TinyMCE for a fast, modern upload experience."}]},{"type":"p","children":[{"text":"Thanks for supporting TinyMCE. We hope it helps you and your users create great content."}]},{"type":"p","children":[{"text":"All the best from the TinyMCE team."}]}]}'>
<textarea id="suggestededits" suggestededits-model='{"history":{"2":[{"id":1,"uid":"james-wilson","timestamp":1752576936000,"feedback":"Nice improvement!"}]},"version":2,"metadata":{"5":{"source":"ai"}},"contents":[{"type":"p","children":[{"type":"img","attrs":{"style":"display: block; margin-left: auto; margin-right: auto;","title":"Tiny Logo","src":"https://www.tiny.cloud/docs/tinymce/latest/_images/logos/android-chrome-256x256.png","alt":"TinyMCE Logo","width":"128","height":"128"}}]},{"type":"h2","attrs":{"style":"text-align: center;"},"children":[{"text":"Welcome to the TinyMCE Suggested Edits "},{"text":"interactive ","opData":{"id":1,"type":"insert","uid":"alex-thompson","timestamp":1752015064000}},{"text":"demo!"}]},{"type":"p","attrs":{"style":"text-align: center;"},"children":[{"text":"Try out the Suggested Edits feature"},{"text":": type in the editor, apply formatting or delete some content. T","opData":{"id":2,"type":"insert","uid":"alex-thompson","timestamp":1752415064000}},{"text":" by typing in the editor and t","opData":{"id":2,"type":"remove","uid":"alex-thompson","timestamp":1752415064000}},{"text":"hen"},{"text":",","opData":{"id":3,"type":"insert","uid":"alex-thompson","timestamp":1752515064000}},{"text":" click"},{"text":"ing","opData":{"id":4,"type":"remove","uid":"alex-thompson","timestamp":1752515064000}},{"text":" the Review Changes button in the toolbar"},{"text":" to see your changes","opData":{"id":5,"type":"insert","uid":"kai-nakamura","timestamp":1752615064000}},{"text":"."}]},{"type":"p","attrs":{"style":"text-align: center;"},"children":[{"text":"And visit the "},{"text":"pricing page","opData":{"id":6,"type":"modify","uid":"kai-nakamura","timestamp":1752615064000},"format":[{"type":"a","attrs":{"href":"https://www.tiny.cloud/pricing"}}],"oldFormat":[{"type":"a","attrs":{"href":"https://www.tiny.cloud/pricing"}},"em"]},{"text":" to learn more about our Premium plugins."}]},{"type":"h2","children":[{"text":"A simple table to play with"}]},{"type":"table","attrs":{"style":"border-collapse: collapse; width: 100%;","border":"1"},"children":[{"type":"thead","children":[{"type":"tr","attrs":{"style":"text-align: left;"},"children":[{"type":"th","children":[{"text":"Product"}]},{"type":"th","children":[{"text":"Cost"}]},{"type":"th","children":[{"text":"Really?"}]}]}]},{"type":"tbody","children":[{"type":"tr","children":[{"type":"td","attrs":{"style":"text-align: center;"},"children":[{"text":"TinyMCE Cloud"}]},{"type":"td","attrs":{"style":"text-align: center;"},"children":[{"text":"Get started for free"}]},{"type":"td","attrs":{"style":"text-align: center;"},"children":[{"text":"Yes!","format":["strong"]}]}]}]}]},{"type":"h2","opData":{"id":7,"type":"insert","uid":"mia-andersson","timestamp":1752576331000},"children":[{"text":"Found a bug?"}]},{"type":"p","children":[{"text":" ","opData":{"id":7,"type":"remove","uid":"mia-andersson","timestamp":1752576331000}},{"text":"If you believe you have found a bug please create an issue on the ","opData":{"id":7,"type":"insert","uid":"mia-andersson","timestamp":1752576331000}},{"text":"GitHub repo","opData":{"id":7,"type":"insert","uid":"mia-andersson","timestamp":1752576331000},"format":[{"type":"a","attrs":{"href":"https://github.com/tinymce/tinymce/issues"}}]},{"text":" to report it to the developers.","opData":{"id":7,"type":"insert","uid":"mia-andersson","timestamp":1752576331000}}]},{"type":"h2","children":[{"text":"Finally…"}]},{"type":"p","children":[{"text":"Need file uploads in your app? Consider using "},{"text":"Uploadcare","format":[{"type":"a","attrs":{"href":"https://www.tiny.cloud/docs/tinymce/latest/uploadcare/","target":"_blank","rel":"noopener noreferrer"}}]},{"text":" with TinyMCE for a fast, modern upload experience."}]},{"type":"p","children":[{"text":"Thanks for supporting TinyMCE. We hope it helps you and your users create great content."}]},{"type":"p","children":[{"text":"All the best from the TinyMCE team."}]}]}'>
{{logofordemoshtml}}

<h2 style="text-align: center;">Welcome to the TinyMCE Suggested Edits interactive demo!</h2>
Expand Down
1 change: 1 addition & 0 deletions modules/ROOT/examples/live-demos/suggestededits/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tinymce.init({
suggestededits_model: model,
suggestededits_access: 'full',
suggestededits_content: 'html',
suggestededits_ai_attribution: true,
view_show: 'suggestededits',
user_id: 'kai-nakamura',
fetch_users: (userIds) => Promise.all(userIds
Expand Down
11 changes: 10 additions & 1 deletion modules/ROOT/pages/8.7.0-release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@ The following premium plugin updates were released alongside {productname} {rele

The {productname} {release-version} release includes an accompanying release of the **Suggested Edits** premium plugin.

**Suggested Edits** includes the following fix.
**Suggested Edits** includes the following improvements and additions.

==== AI-assisted suggestions can display an AI badge
// #TINY-14303
// #TINY-14304
// #TINY-14479

Suggested Edits now records edits made with the xref:tinymceai.adoc[{productname} AI] plugin as AI-assisted. When the new xref:suggestededits.adoc#suggestededits_ai_attribution[`+suggestededits_ai_attribution+`] option is enabled, an AI badge appears on the cards of those edits.

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
// #TINYMCE-13256
Expand Down
6 changes: 5 additions & 1 deletion modules/ROOT/pages/suggestededits.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The {pluginname} plugin keeps track of every edit made to the document by the cu

The {pluginname} model is a JSON object representing the document along with all unreviewed edits and feedback. The model must be kept in sync with the editor content and loaded into the editor at the same time as the content.

The structure of the model is not documented and should not be relied upon.
The structure of the model is not documented and should not be relied upon. Models saved by earlier versions of the plugin continue to load and are upgraded automatically.

The model can be retrieved from the plugin using the xref:#get_model[`+getModel+`] API, saved externally alongside the document, and loaded into the editor with the xref:#suggestededits_model[`+suggestededits_model+`] option. This ensures that the document and the model are in sync and every user's contributions are tracked correctly. If the model and content are out of sync when the editor loads, the difference between them will be included in the next edit by the current user. If a model is not provided in the editor configuration or is set to `+undefined+`, the plugin will generate a new model from the initial content.

Expand Down Expand Up @@ -59,6 +59,8 @@ Replaced content is represented as both added and removed content, and indicates

Each suggested edit is listed as a card in the sidebar and color coded by the type of change. Each card shows a contextual description of the content, along with the user who made the suggestion, when the edit was made, and any feedback provided on that suggestion.

Edits made with the xref:tinymceai.adoc[{productname} AI] plugin are recorded as AI-assisted. When the xref:#suggestededits_ai_attribution[`+suggestededits_ai_attribution+`] option is enabled, an AI badge appears on their cards.

When selected, a suggestion can be handled in the following ways:

* Accept: Resolves the suggestion, applying the edit to the document when the review is completed.
Expand Down Expand Up @@ -129,6 +131,8 @@ include::partial$configuration/suggestededits_access.adoc[leveloffset=+1]

include::partial$configuration/suggestededits_auto_approve.adoc[leveloffset=+1]

include::partial$configuration/suggestededits_ai_attribution.adoc[leveloffset=+1]

include::partial$plugins/suggestededits-open-view.adoc[leveloffset=+1]

include::partial$configuration/user_id.adoc[leveloffset=+1]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[[suggestededits_ai_attribution]]
== `suggestededits_ai_attribution`

This option controls the display of the AI badge on suggestion cards. When set to `+true+`, an AI badge appears on the cards of edits made with the xref:tinymceai.adoc[{productname} AI] plugin.

NOTE: AI-assisted suggestions are always recorded in the model. This option controls only whether the AI badge is displayed.

*Type:* `+Boolean+`

*Default value:* `+false+`

=== Example: using `suggestededits_ai_attribution`

[source,js]
----
tinymce.init({
selector: 'textarea', // Change this value according to your HTML
plugins: 'suggestededits',
toolbar: 'suggestededits',
suggestededits_ai_attribution: true
});
----
Loading