Skip to content

Commit bf96df4

Browse files
authored
Merge branch 'release/8.2.0' into feature/8.2.0/DOC-3223
2 parents ebb11ec + 8dec7ad commit bf96df4

File tree

5 files changed

+118
-33
lines changed

5 files changed

+118
-33
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<textarea id="suggestededits-auto-approve" 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/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","children":[{"text":"TinyMCE Cloud"}]},{"type":"td","children":[{"text":"Get started for free"}]},{"type":"td","children":[{"text":"Yes!","format":["strong"]}]}]},{"type":"tr","children":[{"type":"td","children":[{"text":"Plupload"}]},{"type":"td","children":[{"text":"Free"}]},{"type":"td","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":"Don’t forget to check out "},{"text":"Plupload","format":[{"type":"a","attrs":{"href":"http://www.plupload.com","target":"_blank","rel":"noopener"}}]},{"text":", the upload solution featuring HTML5 upload support."}]},{"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."}]}]}'>
2+
{{logofordemoshtml}}
3+
4+
<h2 style="text-align: center;">Welcome to the TinyMCE Suggested Edits interactive demo!</h2>
5+
6+
<p style="text-align: center;">Try out the Suggested Edits feature: type in the editor, apply formatting or delete some content. Then, click the Review Changes button in the toolbar to see your changes.</p>
7+
8+
<p style="text-align: center;">And visit the <a href="https://www.tiny.cloud/pricing">pricing page</a> to learn more about our Premium plugins.</p>
9+
10+
<h2>A simple table to play with</h2>
11+
12+
<table style="border-collapse: collapse; width: 100%;" border="1">
13+
<thead>
14+
<tr style="text-align: left;">
15+
<th>Product</th>
16+
<th>Cost</th>
17+
<th>Really?</th>
18+
</tr>
19+
</thead>
20+
<tbody>
21+
<tr>
22+
<td>TinyMCE Cloud</td>
23+
<td>Get started for free</td>
24+
<td><strong>Yes!</strong></td>
25+
</tr>
26+
<tr>
27+
<td>Plupload</td>
28+
<td>Free</td>
29+
<td><strong>Yes!</strong></td>
30+
</tr>
31+
</tbody>
32+
</table>
33+
34+
<h2>Found a bug?</h2>
35+
36+
<p>If you believe you have found a bug please create an issue on the <a href="https://github.com/tinymce/tinymce/issues">GitHub repo</a> to report it to the developers.</p>
37+
38+
<h2>Finally…</h2>
39+
40+
<p>Don't forget to check out <a href="http://www.plupload.com" target="_blank" rel="noopener">Plupload</a>, the upload solution featuring HTML5 upload support.</p>
41+
<p>Thanks for supporting TinyMCE. We hope it helps you and your users create great content.</p>
42+
<p>All the best from the TinyMCE team.</p>
43+
44+
</textarea>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
const API_URL = 'https://demouserdirectory.tiny.cloud/v1/users';
2+
3+
const tinymceElement = document.querySelector('textarea#suggestededits-auto-approve');
4+
const model = JSON.parse(tinymceElement.getAttribute('suggestededits-model'));
5+
6+
tinymce.init({
7+
selector: 'textarea#suggestededits-auto-approve',
8+
height: 500,
9+
plugins: 'suggestededits advlist anchor autolink code charmap emoticons fullscreen help image link lists media preview searchreplace table',
10+
toolbar: 'undo redo | suggestededits | styles fontsizeinput | bold italic | align bullist numlist | table link image | code',
11+
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }',
12+
13+
suggestededits_model: model,
14+
suggestededits_access: 'full',
15+
suggestededits_content: 'html',
16+
suggestededits_auto_approve: true,
17+
18+
user_id: 'kai-nakamura',
19+
fetch_users: (userIds) => Promise.all(userIds
20+
.map((userId) =>
21+
fetch(`${API_URL}/${userId}`)
22+
.then((response) => response.json())
23+
.catch(() => ({ id: userId })))),
24+
});

modules/ROOT/pages/8.2.0-release-notes.adoc

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -48,33 +48,14 @@ This new functionality is supported with the following configuration options:
4848

4949
For information on the **Media Optimizer** plugin, see: xref:uploadcare-video.adoc[Media Optimizer: Video].
5050

51-
// === <Premium plugin name 1> <Premium plugin name 1 version>
52-
53-
// The {productname} 8.2.0 release includes an accompanying release of the **<Premium plugin name 1>** premium plugin.
54-
55-
// **<Premium plugin name 1>** <Premium plugin name 1 version> includes the following <fixes, changes, improvements>.
56-
57-
// ==== <Premium plugin name 1 change 1>
58-
// #TINY-vwxyz1
59-
60-
// CCFR here.
61-
62-
// For information on the **<Premium plugin name 1>** plugin, see: xref:<plugincode>.adoc[<Premium plugin name 1>].
63-
64-
=== Suggested Edits
65-
66-
The {productname} {release-version} release includes an accompanying release of the **Suggested Edits** premium plugin.
67-
68-
**Suggested Edits** includes the following improvement.
69-
70-
=== Suggestions now display the type of content that was changed
71-
// #TINY-12598
51+
=== Empty captions for floating images were not rendered correctly.
52+
// #TINY-12592
7253

73-
Previously, the **Suggested Edits** plugin only displayed the word "content" in the suggestion card description, as a generalised context for each suggestion.
54+
In previous versions of **Media Optimizer**, when figures were styled with `+display: table+`, a floated `+<img>+` could cause an empty `+<figcaption>+` to render incorrectly alongside the image instead of below it. Deleting the caption text further disrupted the layout, causing the caption area to shift or disappear entirely.
7455

75-
In {release-version}, the **Suggested Edits** plugin displays the type of content as well as the type of edit in the card description, to provide more context for each suggestion.
56+
In {productname} {release-version}, this issue has been resolved by applying `+clear: both+` to `+<figcaption>+` elements when the associated image is floated. This ensures captions always render below the image, even when empty, maintaining proper alignment and consistent visual structure.
7657

77-
For information on the **Suggested Edits** plugin, see: xref:suggestededits.adoc[Suggested Edits].
58+
For information on the **Media Optimizer** plugin, see: xref:uploadcare.adoc[Media Optimizer].
7859

7960
=== License Key Manager
8061

@@ -87,7 +68,7 @@ The **License Key Manager** has been reworked to include a new `+js/commercialli
8768

8869
For information on the **License Key Manager** plugin, see: xref:license-key.adoc[License Key Manager].
8970

90-
=== **Templates**
71+
=== Templates
9172

9273
The {productname} {release-version} release includes an accompanying release of the **Templates** premium plugin.
9374

@@ -100,20 +81,27 @@ Previously, pressing **Enter** while focused on the title input during category
10081

10182
{productname} {release-version} addresses this issue by updating the input handling logic to check the form's validity before allowing submission when **Enter** is pressed. Now, if the form is invalid or the submit button is disabled, pressing **Enter** will not trigger submission, preventing erroneous attempts to create categories or templates with empty names.
10283

103-
=== Media Optimizer
84+
=== Suggested Edits
10485

105-
The {productname} 8.2.0 release includes an accompanying release of the **Media Optimizer** premium plugin.
86+
The {productname} {release-version} release includes an accompanying release of the **Suggested Edits** premium plugin.
10687

107-
**Media Optimizer** includes the following fix.
88+
**Suggested Edits** includes the following improvements.
10889

109-
=== Empty captions for floating images were not rendered correctly.
110-
// #TINY-12592
90+
==== Added new `+suggestededits_auto_approve+` option to auto-approve edits by the current user
91+
// #TINY-12258
11192

112-
In previous versions of **Media Optimizer**, when figures were styled with `+display: table+`, a floated `+<img>+` could cause an empty `+<figcaption>+` to render incorrectly alongside the image instead of below it. Deleting the caption text further disrupted the layout, causing the caption area to shift or disappear entirely.
93+
A new `suggestededits_auto_approve` option has been added to the **Suggested Edits** plugin. This option allows automatic approval of edits made by the current user, as defined by the xref:suggestededits.adoc#user_id[`+user_id+`] setting, without requiring manual review. When enabled, any new edits and previously suggested changes from the same user are instantly approved and applied, streamlining workflows where review is unnecessary.
11394

114-
In {productname} {release-version}, this issue has been resolved by applying `+clear: both+` to `+<figcaption>+` elements when the associated image is floated. This ensures captions always render below the image, even when empty, maintaining proper alignment and consistent visual structure.
95+
For more information on the `+suggestededits_auto_approve+` option, see: xref:suggestededits.adoc#suggestededits_auto_approve[suggestededits_auto_approve].
11596

116-
For information on the **Media Optimizer** plugin, see: xref:uploadcare.adoc[Media Optimizer].
97+
=== Suggestions now display the type of content that was changed
98+
// #TINY-12598
99+
100+
Previously, the **Suggested Edits** plugin only displayed the word "content" in the suggestion card description, as a generalised context for each suggestion.
101+
102+
In {release-version}, the **Suggested Edits** plugin displays the type of content as well as the type of edit in the card description, to provide more context for each suggestion.
103+
104+
For information on the **Suggested Edits** plugin, see: xref:suggestededits.adoc[Suggested Edits].
117105

118106
=== Full Page HTML
119107

modules/ROOT/pages/suggestededits.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ include::partial$configuration/suggestededits_content.adoc[leveloffset=+1]
125125

126126
include::partial$configuration/suggestededits_access.adoc[leveloffset=+1]
127127

128+
include::partial$configuration/suggestededits_auto_approve.adoc[leveloffset=+1]
129+
128130
include::partial$configuration/user_id.adoc[leveloffset=+1]
129131

130132
include::partial$configuration/fetch_users.adoc[leveloffset=+1]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[[suggestededits_auto_approve]]
2+
== `suggestededits_auto_approve`
3+
4+
The `suggestededits_auto_approve` option controls whether edits made during the session by the current user are automatically approved without requiring manual review. With this option enabled any edits by the current user, as set by the xref:#user_id[`+user_id+` option], as well as any previous suggestions made by the current user, will be instantly applied, bypassing the review process. This is useful for scenarios where reviews aren't necessary, such as when creating an initial draft or when the user is a trusted editor.
5+
6+
When set to:
7+
8+
* `false`: All edits require manual approval before being applied.
9+
* `true`: All new edits are automatically approved and applied.
10+
11+
12+
*Type:* `+Boolean+`
13+
14+
*Default Value*: `false`
15+
16+
.Example: `suggestededits_auto_approve: true`
17+
[source,javascript]
18+
----
19+
tinymce.init({
20+
selector: 'textarea#suggestededits', // Change this value according to your HTML
21+
plugins: 'suggestededits',
22+
toolbar: 'suggestededits',
23+
suggestededits_auto_approve: true, // Change this value to auto-approve suggested edits
24+
});
25+
----
26+
27+
liveDemo::suggestededits-auto-approve[]

0 commit comments

Comments
 (0)