Skip to content

Commit 666a158

Browse files
committed
Docs: DOC-3526 - Document tinymceai_reviews_change_tone_menu option (TINY-14274)
Add the tinymceai_reviews_change_tone_menu configuration option to the TinyMCE AI options reference and link to it from the 8.7.0 release note. Correct the release note: an empty array is accepted with a warning and does not hide the Change Tone review.
1 parent bad138c commit 666a158

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The {productname} {release-version} release includes an accompanying release of
3737
==== New `tinymceai_reviews_change_tone_menu` option to control the Change Tone review menu
3838
// #TINY-14274
3939

40-
{productname} {release-version} adds the `+tinymceai_reviews_change_tone_menu+` option for **TinyMCE AI**, which controls the tone options shown in the Change Tone review menu. Only preset tone IDs are supported, the configured order is reflected in the menu, and duplicate values are removed. An invalid configuration falls back to the default tones, and an empty array (`+[]+`) hides the Change Tone review.
40+
{productname} {release-version} adds the `+tinymceai_reviews_change_tone_menu+` option for **TinyMCE AI**, which controls the tone options shown in the Change Tone review and their order. Only preset tone IDs are supported, the configured order is reflected in the menu, and duplicate values are removed. An invalid configuration falls back to the default tones. For the full list of tone IDs and behavior, see the xref:tinymceai.adoc#tinymceai_reviews_change_tone_menu[`+tinymceai_reviews_change_tone_menu+`] option.
4141

4242
For information on the **TinyMCE AI** plugin, see: xref:tinymceai.adoc[TinyMCE AI].
4343

modules/ROOT/partials/configuration/tinymceai_options.adoc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,3 +563,52 @@ tinymce.init({
563563
});
564564
----
565565

566+
[[tinymceai_reviews_change_tone_menu]]
567+
=== `+tinymceai_reviews_change_tone_menu+`
568+
569+
Array of tone control IDs that define which tone options appear in the Change Tone review, and their order. Only the listed tones are available to users.
570+
571+
This option applies only when `+'ai-reviews-change-tone'+` is included in the xref:tinymceai.adoc#tinymceai_reviews[`+tinymceai_reviews+`] option.
572+
573+
*Type:* `+Array+` of `+String+`
574+
575+
*Valid values:*
576+
577+
* `+'ai-reviews-tone-casual'+`: Casual tone
578+
* `+'ai-reviews-tone-direct'+`: Direct tone
579+
* `+'ai-reviews-tone-friendly'+`: Friendly tone
580+
* `+'ai-reviews-tone-confident'+`: Confident tone
581+
* `+'ai-reviews-tone-professional'+`: Professional tone
582+
583+
Duplicate IDs are removed, and the configured order is reflected in the menu. If the option contains any value that is not a valid tone ID, the configuration is rejected and the default tones are used. An empty array (`+[]+`) is accepted but logs a console warning. To remove the Change Tone review entirely, omit `+'ai-reviews-change-tone'+` from the xref:tinymceai.adoc#tinymceai_reviews[`+tinymceai_reviews+`] option.
584+
585+
*Default value:*
586+
[source,js]
587+
----
588+
[
589+
'ai-reviews-tone-casual',
590+
'ai-reviews-tone-direct',
591+
'ai-reviews-tone-friendly',
592+
'ai-reviews-tone-confident',
593+
'ai-reviews-tone-professional'
594+
]
595+
----
596+
597+
.Example
598+
[source,js]
599+
----
600+
tinymce.init({
601+
selector: 'textarea',
602+
plugins: 'tinymceai',
603+
toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review',
604+
tinymceai_reviews_change_tone_menu: [
605+
'ai-reviews-tone-professional',
606+
'ai-reviews-tone-friendly'
607+
],
608+
// Required for authentication
609+
tinymceai_token_provider: () => {
610+
return fetch('/api/token').then(r => r.json());
611+
}
612+
});
613+
----
614+

0 commit comments

Comments
 (0)