AI Quick Actions
AI Quick Actions streamline routine content transformations by offering one-click AI-powered suggestions directly within the editor. You can also ask questions about your selected text in the Chat to get instant AI insights and analysis. This feature enhances speed, relevance, and usability, particularly for repeatable or simple tasks. The feature comes with an easy-to-use window interface but can also act as a conversation starter with the Chat.
To start using the Quick actions feature, first load the AIQuickActions plugin in your editor configuration. Learn more about installing and enabling AI features.
Then, you can add the menu that opens the list of Quick actions ('aiQuickActions') to your main toolbar and/or balloon toolbar configurations. To learn more about toolbar configuration, refer to the toolbar configuration guide.

Finally, you can also add individual Quick actions to the toolbar as shortcuts for even easier access. For example, you can add the 'ask-ai' button, or the 'improve-writing' button (find it in the demo above). You can add whole categories to the toolbar, too. Learn more about available actions.
The final example configuration looks as follows:
ClassicEditor
.create( {
/* ... */
plugins: [ AIQuickActions, /* ... */ ],
ai: {
/* ... */
},
// Adding Quick action to the main editor toolbar.
toolbar: [
// The main Quick actions button
'aiQuickActions',
// Two individual actions
'ask-ai',
'improve-writing',
// Whole action category
'translate',
/* ... */
],
// Adding Quick Actions to the balloon toolbar. Since some of the actions are selection-sensitive,
// accessing them might be easier for users using this kind of toolbar.
balloonToolbar: {
items: [
// The main Quick actions button
'aiQuickActions',
// Two individual actions
'ask-ai',
'improve-writing',
// Whole action category
'translate',
/* ... */
],
}
} )
.then( /* ... */ )
.catch( /* ... */ );
There are two types of actions available in the Quick actions feature:
-
Some actions, for instance, “Ask AI” or “Summarize”, lead to the Chat interface with selected text added as context. The former will just open the Chat and allow you to start typing your message. The latter, however, will not only open the Chat but also start the conversation for your current editor selection right away, and expect a summary of that selection from the AI.
-
Executing other actions like “Continue writing” or “Make shorter” will open the window interface conveniently right next to your selection and present the answers from the AI for you to accept or reject them.
You can define the behavior of each action when you create custom ones.
By default, the Quick actions feature includes several built-in actions that speed up the content editing process. All Quick actions can be accessed through the menu button ('aiQuickActions') but also individually when handpicked by the integrator in the editor toolbar configuration. You can add the whole action categories to the toolbar too.
Keep in mind that you can add custom actions to the list and remove defaults.
Here’s the full list of available actions:
'ask-ai',- “Chat commands” category (
'chat-commands')'explain','summarize','highlight-key-points',
'improve-writing','continue','fix-grammar',- “Adjust length” category (
'adjust-length')'make-shorter','make-longer',
- “Change tone” category (
'change-tone')'make-tone-casual','make-tone-direct','make-tone-friendly','make-tone-confident','make-tone-professional',
- “Translate” category (
'translate')'translate-to-english','translate-to-chinese','translate-to-french','translate-to-german','translate-to-italian','translate-to-portuguese','translate-to-russian'
The config.ai.quickActions.extraCommands property allows you to add new commands to the AI Quick Actions feature. Below, you will find an example of three extra actions added to the user interface: two of them open the quick actions window, but the last one interacts with the Chat. Learn more about types of actions.
ClassicEditor
.create( {
/* ... */
plugins: [ AIQuickActions, /* ... */ ],
ai: {
quickActions: {
extraCommands: [
{
id: 'add-quote-from-famous-person',
label: 'Add a quote from a famous person',
prompt: 'Add a quote from a known person, which would make sense in the context of the selected text.',
type: 'action'
// No `model` specified — uses the default configured in `ai.models.defaultModelId`.
},
{
id: 'summarize-in-bullet-points',
label: 'Summarize',
displayedPrompt: 'Summarize in 5 bullet points',
prompt: 'Summarize the selected text in 5 bullet points.',
type: 'chat'
},
{
id: 'include-more-sarcasm',
label: 'Rewrite adding more sarcasm',
prompt: 'Rewrite using a sarcastic tone.',
type: 'action',
model: 'claude-4-6-sonnet' // Pin a specific model for this action.
}
// ... More commands ...
],
},
/* ... */
}
} )
.then( ... )
.catch( ... );
An action can also take its prompt from a context instead of carrying it inline. See the Context section below.
The config.ai.quickActions.removeCommands property allows you to remove existing commands from the AI Quick Actions feature. Here’s an example that removes two actions (”Explain” and “Summarize”):
ClassicEditor
.create( {
/* ... */
plugins: [ AIQuickActions, /* ... */ ],
ai: {
quickActions: {
removeCommands: [
'explain',
'summarize',
// ... More commands to remove ...
]
},
/* ... */
}
} )
.then( ... )
.catch( ... );
Quick actions can draw on a context from the Context Library – a named container of reusable prompts, reference files, or both, kept on the AI service and referenced by its id. A context can shape every action automatically, or supply the prompt of a single custom action.
Reference the context in config.ai.defaultContext and target the quickActions feature. Set it to true to attach the context to every action:
ClassicEditor
.create( {
/* ... */
plugins: [ AIQuickActions, /* ... */ ],
ai: {
defaultContext: [
{
id: 'brand-voice',
features: {
quickActions: true
}
}
]
}
} )
.then( /* ... */ )
.catch( /* ... */ );
Provide a RegExp instead to attach the context only to selected actions. It is matched against the ID of the action and the ID of the group it belongs to, so a group ID covers every action inside it. The example below attaches a glossary to the whole “Translate” category, which includes translate-to-german and its siblings:
ai: {
defaultContext: [
{
id: 'glossary',
features: {
quickActions: /^translate/
}
}
]
}
Both the default actions and the custom ones are covered. The attached context is invisible to the user. When an action of the 'chat' type starts an AI Chat conversation, that conversation receives the matching quickActions entries as well as the chat entries.
An action of the 'action' type can take a context reference instead of an inline prompt, so the prompt is maintained in the Context Library rather than in the editor configuration. This suits instructions owned outside the codebase – the team that owns the brand voice updates the prompt in the library, and every custom action picks it up without a deployment. The prompt text also stays out of the frontend: it is not stored in the editor configuration and does not show up in the network traffic of the request. Combining both sends the inline prompt and attaches the context as reference material:
ai: {
quickActions: {
extraCommands: [
// The referenced prompt drives the action.
{
id: 'rewrite-for-brand',
label: 'Rewrite for our brand',
type: 'action',
context: { id: 'brand-voice', promptId: 'bR8xY_2fLpQ4mZ7nK1sTd' }
},
// An inline prompt with a file attached as reference material.
{
id: 'add-quote-from-famous-person',
label: 'Add a quote from a famous person',
type: 'action',
prompt: 'Add a quote from a known person, which would make sense in the context of the selected text.',
context: { id: 'brand-voice', fileId: 'Xh3TpQ9-rNs6BvL2mKd0W' }
}
]
}
}
A context that references only a single file cannot drive an action on its own and must be combined with an inline prompt. An action of the 'chat' type has no context property and always carries its prompt inline, but it still receives the default context entries that match it.
The promptId and fileId values are generated by the AI service, unlike the context id. Read more about context references.
Quick Actions can be triggered programmatically – execute system actions or custom prompts from code.
Some of our APIs are experimental but ready for production usage. We mark them as experimental to have a possibility to iterate on them faster. That means minor releases without the standard deprecation policy. Breaking changes will always be documented in the changelog with migration guidance.
| API | Description |
|---|---|
AIActions#executeAction() |
Execute a system action or a custom prompt on the current selection. |
AIActionDefinition |
Type defining the parameters for an AI action (system actionName or custom userMessage). |
AIActionsNames |
Enum of available system action names. |
See the programmatic usage guide for details, examples, and a live demo.
Quick Actions are also available via the Actions REST API for use outside the editor. Use this to run stateless content transforms like fixing grammar, improving writing, or running custom prompts from your backend or frontend code. See the programmatic documentation for examples and the full API reference.