You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DOC-3468 - Document TinyMCE AI 8.5 custom reviews, commands, and quickbars integration (#4070)
* DOC-3468: Document TinyMCE AI 8.5 custom reviews, commands, and quickbars integration
- Add tinymceai_reviews option with ai-reviews-custom for custom review
- Document all new Quick Action commands and TinyMCEAIChatPrompt
- Add id property to tinymceai_quickactions_custom for toolbar/menu/quickbars use
- Update full-featured and tinymceai-review demos with explicit tinymceai_reviews
- Update editor-command-identifiers and tinymceai-actions for quickbars integration
- Remove undocumented TinyMCEAIDiagnostic command
- Update review sidebar screenshot
* trigger staging preview build
* DOC-3468: Fix command partial headings from block titles to section headings
* DOC-3468: Address PR feedback — custom reviews ship by default
- Remove explicit tinymceai_reviews from all 4 demo files (default config)
- Simplify Custom review table row and NOTE (no qualifier needed)
- Apply wording suggestion for quickbars custom action note
- Reword Custom review section as default rather than conditional
* DOC-3468: Address remaining PR feedback — id scope, floating sidebar, antora revert
- Revert antora.yml live demo URL from 8-dev to 8
- Scope custom action `id` to menu items only (confirmed from source:
addMenuItem only, no addButton) — remove quickbars/toolbar references
- Remove dedicated floating sidebar ToggleSidebar section; replace with
sidebar-type-agnostic NOTE (TINY-14243 made API identical for both)
- Clean up id example to remove misleading quickbars config
* DOC-3468: Fix review label mismatch — "Adjust length" to "Change length"
Aligns the editor label in the built-in reviews table and quick actions
reference table with the actual UI string from source (I18n.CHANGE_LENGTH).
The xref:tinymceai.adoc[TinyMCE AI (`+tinymceai+`)] plugin registers AI Chat and AI Review sidebars. The following subsection describes how to open and close them using a core editor command.
533
+
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.
|**Adjust length** |`ai-quickactions-change-length` |`make-shorter`, `make-longer` |Shorten or lengthen the selection. Each option is its own system action. |✓ |✓
141
+
|**Change length** |`ai-quickactions-change-length` |`make-shorter`, `make-longer` |Shorten or lengthen the selection. Each option is its own system action. |✓ |✓
To start using the Review feature, add `+tinymceai+` to the plugins option. This will automatically add the image:icons-premium/ai-review.svg[Review icon,24px] Review toolbar button and menu item to the default {productname} toolbar and menu.
33
+
To start using the Review feature, add `+tinymceai+` to the plugins configuration option. This will automatically add the image:icons-premium/ai-review.svg[Review icon,24px] Review toolbar button and menu item to the default {productname} toolbar and menu.
34
34
35
35
See xref:tinymceai.adoc[Plugin Reference] for more information regarding installation and enabling AI features.
36
36
@@ -42,7 +42,7 @@ While in the Review Mode, the editor remains read-only and allows browsing sugge
42
42
43
43
image::tinymceai/tinymce-ai-review-improve-readability-suggestion-cards-and-underlines.png[{pluginname} Review sidebar with suggestions,width=80%]
44
44
45
-
Review suggestions can be individually skipped or applied by clicking the corresponding buttons. Changes that were accepted or dismissed become greyed out in the interface. The "Complete" button in the top of the sidebar enables actions such as:
45
+
Review suggestions can be individually skipped or applied by clicking the corresponding buttons. Changes that were accepted or dismissed become grayed out in the interface. The "Complete" button in the top of the sidebar enables actions such as:
46
46
47
47
- Skipping or applying the remaining suggestions in bulk
48
48
- Completing the review with the currently applied suggestions (and skipping the rest)
@@ -63,20 +63,30 @@ Built-in system reviews are listed below. The **Editor** column is the label in
63
63
64
64
|**Improve readability** |Readability |Improve readability through sentence structure, paragraph structure, transitions, word choice, and reading level. |✓ |✓
65
65
66
-
|**Adjust length** |Length Optimization |Shorten or lengthen the text while preserving key information. The editor offers _Longer_ and _Shorter_ options. |✓ |✓
66
+
|**Change length** |Length Optimization |Shorten or lengthen the text while preserving key information. The editor offers _Longer_ and _Shorter_ options. |✓ |✓
67
67
68
68
|**Adjust tone and style** |Tone Adjustment |Adjust tone and style. The editor includes _Casual_, _Direct_, _Friendly_, _Confident_, and _Professional_ options. |✓ |✓
69
69
70
+
|**Custom review** |— |xref:tinymceai-review.adoc#custom-review-choose-review[Custom review]: custom prompt and model; streams like other reviews. |✓ |✓ (custom review calls endpoint)
71
+
70
72
| |Translation |Translate between languages with cultural adaptation. | |✓
71
73
|===
72
74
73
75
[NOTE]
74
76
====
75
77
* A checkmark in the Editor UI column means that review type can appear in the Review sidebar when it is listed in xref:tinymceai.adoc#tinymceai_reviews[`tinymceai_reviews`].
76
-
* Custom reviews (analysis defined with a prompt) are available through the xref:tinymceai-review.adoc#reviews-custom-reviews[Custom reviews (API)]. _Note: The same capability in the Review sidebar is coming soon._
78
+
* xref:tinymceai-review.adoc#custom-review-choose-review[Custom review] is included in the Review sidebar by default. The xref:tinymceai-review.adoc#reviews-custom-reviews[Custom reviews (API)] section describes the REST endpoint used for the same streaming review flow.
77
79
* Translation Review is API-only (not listed in the Review sidebar); see the xref:tinymceai-review.adoc#built-in-reviews[Translation row] in the table above. For translation from the editor, see **Translate** in xref:tinymceai-actions.adoc#quick-actions-reference-table[Quick Actions reference table].
78
80
====
79
81
82
+
[[custom-review-choose-review]]
83
+
== Custom review
84
+
85
+
The Review sidebar includes a **Custom review** category by default. A natural-language prompt can be entered, and an AI model can be selected when xref:tinymceai.adoc#tinymceai_allow_model_selection[`tinymceai_allow_model_selection`] allows it; the review runs from **Run**. The document is analyzed with streaming suggestions like xref:tinymceai-review.adoc#review-sidebar-and-built-in-reviews[built-in reviews]; **Run** remains disabled until the prompt is entered and a model is selected. To hide Custom review, remove `+'ai-reviews-custom'+` from xref:tinymceai.adoc#tinymceai_reviews[`tinymceai_reviews`].
86
+
87
+
[TIP]
88
+
The backend uses the custom review call (`POST /v1/reviews/custom/calls`) with `content`, `prompt`, and `model` in the request body. After a run completes, **Retry** in the Review UI can re-run the last review with the same parameters for both system and custom reviews.
89
+
80
90
[[review-configuration]]
81
91
== Configuration
82
92
@@ -92,7 +102,7 @@ The Review plugin feature is built on top of the Reviews API, which provides RES
92
102
Reviews use streaming output with Server-Sent Events for real-time feedback as suggestions are generated. Each review type is optimized for specific improvement tasks, providing consistent, high-quality analysis of text structure, style, and quality. Reviews provide specific, actionable recommendations for content improvement.
93
103
94
104
[[reviews-system-reviews-api]]
95
-
=== System Reviews
105
+
=== System reviews
96
106
97
107
System reviews are default review operations for common use cases, which each use the AI agent most suitable for their functionality. The API includes one endpoint for running system reviews, which is passed the review name.
98
108
@@ -103,26 +113,26 @@ For endpoint details, request and response schemas, authentication, and streamin
103
113
[[reviews-custom-reviews]]
104
114
=== Custom reviews (API)
105
115
106
-
Integrators can also define custom reviews using the Custom Review API endpoint, which returns a output in a similar manner to system reviews but which takes a custom prompt to define the analysis behavior. Custom reviews can be as simple as checking for specific words or phrases, or as complex as applying a company style guide that includes business logic, specific terminology, and more.
116
+
Integrators can also call the Custom Review API endpoint directly. It streams suggestions in the same way as system reviews but takes a custom `prompt` (and `model`) with document `content` in the request body. Custom reviews can be as simple as checking for specific words or phrases, or as complex as applying a company style guide that includes business logic, specific terminology, and more.
107
117
108
-
See https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] for the endpoint, parameters, and examples.
118
+
See https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] for the endpoint, parameters, and examples.
109
119
110
-
The Review sidebar only exposes those built-in types for now; sidebar support for custom reviews is coming soon.
120
+
Users can also run custom reviews directly from the editor through the xref:tinymceai-review.adoc#custom-review-choose-review[Custom review] category in the Review sidebar.
111
121
112
122
Custom reviews require the `ai:reviews:custom` permission in the JWT token.
113
123
114
124
[[reviews-streaming]]
115
-
=== Streaming Responses
125
+
=== Streaming responses
116
126
117
-
Reviews use Server-Sent Events (SSE) for real-time streaming results. See the xref:tinymceai-streaming.adoc[Streaming Responses guide] for detailed implementation information.
127
+
Reviews use Server-Sent Events (SSE) for real-time streaming results. See the xref:tinymceai-streaming.adoc[Streaming responses guide] for detailed implementation information.
118
128
119
129
[[reviews-api-reference]]
120
-
=== API Reference
130
+
=== API reference
121
131
122
132
The https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] reference (interactive OpenAPI documentation) is the full source for endpoints, request and response schemas, authentication, system and custom review calls, worked examples, and streaming review responses.
123
133
124
134
[[related-features]]
125
-
== Related Features
135
+
== Related features
126
136
127
137
* xref:tinymceai-chat.adoc[AI chat]: For interactive discussions with document analysis and context.
128
138
* xref:tinymceai-actions.adoc[Quick actions]: Shortcuts to individual AI operations on a selection or range (transformations, translation, chat, and custom actions).
Copy file name to clipboardExpand all lines: modules/ROOT/partials/commands/tinymceai-cmds.adoc
+56-2Lines changed: 56 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
[[tinymceai-toggling-sidebars]]
2
-
.Toggling the AI Chat and AI Review sidebars
2
+
=== Toggling the AI Chat and AI Review sidebars
3
3
4
-
AI Chat and AI Review use sidebars registered by the plugin. To show or hide them programmatically, use the core `+ToggleSidebar+` command (listed in the xref:editor-command-identifiers.adoc#miscellaneous-core-commands[Miscellaneous Core Commands] table), not a command defined by the TinyMCE AI plugin. Pass the sidebar identifier as the third argument:
4
+
AI Chat and AI Review use sidebars registered by the plugin. To show or hide them programmatically, use the core `+ToggleSidebar+` command (listed in the xref:editor-command-identifiers.adoc#miscellaneous-core-commands[Miscellaneous Core Commands] table), not a command defined by the `+tinymceai+` plugin. Pass the sidebar identifier as the third argument:
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.
23
+
24
+
[[tinymceai-plugin-commands]]
25
+
=== TinyMCE AI plugin commands
26
+
27
+
The xref:tinymceai.adoc[`tinymceai`] plugin registers the following editor commands. They mirror the Quick Actions and related UI: each invocation returns immediately while the plugin performs any network and UI work asynchronously.
28
+
29
+
[cols="2,2,3",options="header"]
30
+
|===
31
+
|Command |Third argument |Description
32
+
33
+
|`+TinyMCEAIQuickActionImproveWriting+` | |Runs the **Improve writing** quick action.
34
+
|`+TinyMCEAIQuickActionContinueWriting+` | |Runs the **Continue writing** quick action.
35
+
|`+TinyMCEAIQuickActionCheckGrammar+` | |Runs the **Fix grammar** quick action.
|`+TinyMCEAIQuickActionTranslate+` |`+string+` |Runs **Translate** with the given language label (same string family as xref:tinymceai.adoc#tinymceai_languages[`tinymceai_languages`] `+language+` values).
44
+
|`+TinyMCEAIQuickActionCustom+` |`+{ prompt, model }+` |Runs a custom quick action with the given prompt and model (same behavior as xref:tinymceai.adoc#tinymceai_quickactions_custom[`tinymceai_quickactions_custom`] preview actions).
45
+
|`+TinyMCEAIQuickActionsExplain+` | |Opens Chat with the built-in **Explain** prompt.
46
+
|`+TinyMCEAIQuickActionsSummarize+` | |Opens Chat with the built-in **Summarize** prompt.
47
+
|`+TinyMCEAIQuickActionsHighlightKeyPoints+` | |Opens Chat with the built-in **Highlight key points** prompt.
48
+
|`+TinyMCEAIChatPrompt+` |`+{ prompt, displayedPrompt? }+` |Opens the Chat sidebar if needed, then sends `+prompt+` to the back end. Optional `+displayedPrompt+` controls the label shown in the chat UI when it differs from the text sent to the model.
49
+
|===
50
+
51
+
[NOTE]
52
+
====
53
+
Command names use the `+TinyMCEAIQuickActions…+` prefix (with an `+s+`) for **Explain**, **Summarize**, and **Highlight key points** — these map to the xref:tinymceai.adoc#tinymceai_quickactions_chat_prompts[chat prompts] submenu, not to standalone `+TinyMCEAIQuickAction…+` spellings.
Copy file name to clipboardExpand all lines: modules/ROOT/partials/configuration/tinymceai_options.adoc
+41-3Lines changed: 41 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,7 @@ These options configure the AI Chat sidebar, where users have interactive conver
180
180
181
181
Populates the sources menu with submenus of files and web resources. Users can select these sources as additional context for chat conversations.
182
182
183
-
Takes a function that returns a Promise resolving to an array of additional context source groups. Each group has `+label+`, optional `+icon+`, and `+sources+` array. Each source has `+id+`, `+label+`, and `+type+` (`+'web-resource'+` or `+'file'+`). A source's `+id+` is used to fetch its content via xref:tinymceai.adoc#tinymceai_chat_fetch_source[`tinymceai_chat_fetch_source`].
183
+
Takes a function that returns a Promise resolving to an array of additional context source groups. Each group has `+label+`, optional `+icon+`, and `+sources+` array. Each source has `+id+`, `+label+`, and `+type+` (`+'web-resource'+` or `+'file'+`). A source's `+id+` is used to fetch its content through xref:tinymceai.adoc#tinymceai_chat_fetch_source[`tinymceai_chat_fetch_source`].
184
184
185
185
*Type:* `+Function+` (`+() => Promise<Array>+`)
186
186
@@ -255,7 +255,7 @@ tinymce.init({
255
255
[[tinymceai_chat_welcome_message]]
256
256
=== `+tinymceai_chat_welcome_message+`
257
257
258
-
Customises the welcome message displayed in the Chat sidebar when starting a new conversation.
258
+
Customizes the welcome message displayed in the Chat sidebar when starting a new conversation.
259
259
260
260
*Type:* `+String+`
261
261
@@ -440,6 +440,7 @@ Array of custom actions rendered in the Custom submenu within the AI Quick Actio
440
440
* `+prompt+`: The prompt sent to the AI
441
441
* `+type+`: `+'action'+` or `+'chat'+`
442
442
* `+model+`: Required for `+action+` type only
443
+
* `+id+` (optional): Stable identifier for the custom action. When set, the same string can be listed in xref:tinymceai.adoc#tinymceai_quickactions_menu[`tinymceai_quickactions_menu`] so the action appears as its own top-level menu item instead of only inside the Custom submenu. The identifier can also be used in the xref:menus-configuration-options.adoc#menu[`+menu+`] option or any other menu configuration that accepts menu item identifiers.
443
444
444
445
*Type:* `+Array+` of `+Object+`
445
446
@@ -474,6 +475,39 @@ tinymce.init({
474
475
});
475
476
----
476
477
478
+
.Example: custom actions as top-level Quick Actions menu items using `+id+`
prompt: 'Add a quote from a known person, which would make sense in the context of the selected text.',
495
+
type: 'action',
496
+
model: 'gemini-2-5-flash'
497
+
},
498
+
{
499
+
id: 'ai-summarize',
500
+
title: 'Summarize in 5 bullet points',
501
+
prompt: 'Summarize the selected text in 5 bullet points.',
502
+
type: 'chat'
503
+
}
504
+
],
505
+
tinymceai_token_provider: () => {
506
+
return fetch('/api/token').then(r => r.json());
507
+
}
508
+
});
509
+
----
510
+
477
511
[[options-review]]
478
512
== Options for Review
479
513
@@ -493,6 +527,9 @@ Array of review command IDs that define which review types appear in the Review
493
527
* `+'ai-reviews-improve-readability'+`: Adjust sentence structure and word choice
494
528
* `+'ai-reviews-change-length'+`: Shorten or lengthen text
495
529
* `+'ai-reviews-change-tone'+`: Modify tone and style
530
+
* `+'ai-reviews-custom'+`: xref:tinymceai-review.adoc#custom-review-choose-review[Custom review] — accepts a prompt and model, then runs the same streaming preview and apply flow as other reviews
531
+
532
+
To hide Custom review from the Review sidebar, omit `+'ai-reviews-custom'+` from the array.
496
533
497
534
*Default value:*
498
535
[source,js]
@@ -502,7 +539,8 @@ Array of review command IDs that define which review types appear in the Review
0 commit comments