Skip to content

Commit da64a12

Browse files
committed
DOC-3356: Update, improve example and context around tinymceai_quickactions_menu.
1 parent 7bb9494 commit da64a12

1 file changed

Lines changed: 25 additions & 18 deletions

File tree

modules/ROOT/pages/tinymceai-actions-plugin.adoc

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To learn more about toolbar configuration, refer to the xref:toolbar-configurati
3737

3838
image::https://placehold.net/default.png[TinyMCE AI Quick Actions dropdown in the toolbar]
3939

40-
Finally, individual Quick Actions can also be added to the toolbar as shortcuts for even easier access. For example, add the `ask-ai` image:https://placehold.net/default.png[Ask AI icon,24px] button, or the `improve-writing` image:https://placehold.net/default.png[Improve Writing icon,24px] button (find it in the demo above). Whole categories can be added to the toolbar, too. xref:tinymceai-actions-plugin.adoc#default-actions[Learn more about available actions].
40+
Finally, individual Quick Actions can also be added to the toolbar as shortcuts for even easier access. For example, add the `tinymceai-improve-writing` image:https://placehold.net/default.png[Improve Writing icon,24px] button, or the `tinymceai-explain` image:https://placehold.net/default.png[Explain icon,24px] button (find it in the demo above). Whole categories can be added to the toolbar, too. xref:tinymceai-actions-plugin.adoc#default-actions[Learn more about available actions].
4141

4242
The final example configuration looks as follows:
4343

@@ -51,23 +51,31 @@ tinymce.init({
5151
},
5252
5353
// Adding Quick Actions to the main editor toolbar.
54-
toolbar: [
55-
// The main Quick Actions button
56-
'tinymceai-actions',
57-
58-
// Two individual actions
59-
'ask-ai',
60-
'improve-writing',
61-
62-
// Whole action category
63-
'translate',
64-
65-
// ... other toolbar items
66-
],
54+
toolbar: 'undo redo showai aiquickactions aireview | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
6755
68-
// Adding Quick Actions to the balloon toolbar. Since some of the actions are selection-sensitive,
56+
// Adding Quick Actions to the context toolbar (selection toolbar). Since some of the actions are selection-sensitive,
6957
// accessing them might be easier for users using this kind of toolbar.
70-
quickbars_selection_toolbar: 'tinymceai-actions | ask-ai | improve-writing | translate'
58+
tinymceai_context_toolbar: 'showai aiquickactions aireview',
59+
60+
// Configure the main Quick Actions menu
61+
tinymceai_quickactions_menu: [
62+
'tinymceai-chat-commands',
63+
'tinymceai-improve-writing',
64+
'tinymceai-continue',
65+
'tinymceai-fix-grammar',
66+
'tinymceai-adjust-length',
67+
'tinymceai-change-tone',
68+
'tinymceai-translate'
69+
],
70+
71+
// Configure a sub-menu (e.g., chat commands)
72+
tinymceai_chat_commands_menu: [
73+
'tinymceai-explain',
74+
'tinymceai-summarize',
75+
'tinymceai-highlight-key-points'
76+
],
77+
78+
tinymceai_sidebar_type: 'static'
7179
});
7280
----
7381

@@ -76,7 +84,7 @@ tinymce.init({
7684

7785
There are two types of actions available in the quick actions feature:
7886

79-
* Chat actions, such as "Explain" or "Summarize", open the xref:tinymceai-chat.adoc[Chat] interface with the selected text added as context and automatically start the conversation with a pre-filled prompt. Actions like "Ask AI" open the Chat interface and allow users to start typing their message.
87+
* Chat actions, such as "Explain" or "Summarize", open the xref:tinymceai-chat.adoc[Chat] interface with the selected text added as context and automatically start the conversation with a pre-filled prompt.
8088

8189
* Preview actions, such as "Continue writing", "Make shorter", "Improve writing", or "Fix grammar", display the AI response in a preview interface where users can review and accept or reject the suggested changes.
8290

@@ -91,7 +99,6 @@ Keep in mind that xref:tinymceai-actions-plugin.adoc#custom-actions[custom actio
9199

92100
Here's the full list of available actions:
93101

94-
* `'ask-ai'`
95102
* **"Chat commands"** category (`'chat-commands'`)
96103
** `'explain'`
97104
** `'summarize'`

0 commit comments

Comments
 (0)