TinyMCE AI Quick Actions

Quick actions simplify routine content transformations by offering one-click AI-powered suggestions directly within the editor. This feature enhances speed, relevance, and usability, particularly for repeatable or simple tasks. For suggestions that change the document, the editor shows a preview and applies changes only after each suggestion is accepted or rejected. For actions that only open Chat with a pre-filled prompt, see Chat. The API includes the ability to call default and optimized system actions, or to define your own.

Preview transformations and Actions API calls are stateless: each invocation is independent and does not retain prior interactions, unlike ongoing Chat conversations. Quick Actions that open Chat with a pre-filled prompt hand off to the Conversations API instead.

The Quick Actions feature is available as part of the tinymceai plugin for TinyMCE and through the Actions API. This page covers both:

Demo

The live demo loads the full TinyMCE example with Chat, Quick Actions, and Review on the toolbar.

  • TinyMCE

  • HTML

  • JS

<textarea id="tinymceai-actions">
<h1>The Future of Content Creation: Integrating GenAI into Modern Workflows</h1>
<p>The landscape of digital content creation is undergoing a seismic shift. For years, the process of writing, editing, and publishing remained largely manual, requiring significant cognitive load for every draft. However, the emergence of Generative AI (GenAI) has introduced a new paradigm. By embedding intelligence directly into the tools where writing happens, organizations can unlock unprecedented levels of productivity and creativity.</p>
<figure class="image"><img style="width: 566px; aspect-ratio: 1536 / 1024; display: block; margin-left: auto; margin-right: auto;" src="https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/preview/" sizes="(min-width: 1536px) 1536px, 100vw" srcset="https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/resize/100x/ 100w,https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/resize/200x/ 200w,https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/resize/300x/ 300w,https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/resize/500x/ 500w,https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/resize/750x/ 750w,https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/resize/1000x/ 1000w,https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/resize/1250x/ 1250w,https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/resize/1500x/ 1500w,https://tiny.ucarecdn.com/c273f5d9-8931-4f66-86a4-347a6137ca88/-/preview/ 1536w" alt="Retro pop art illustration in red and blue halftone style showing a friendly robot collaborating with three people using laptops and tablets, symbolizing AI-assisted content creation and teamwork." height="357">
  <figcaption>By embedding intelligence directly into the tools where writing happens, organizations unlock unprecedented levels of productivity and creativity.</figcaption>
</figure>
<h2>The Shift from External Tools to Native Integration</h2>
<p>Many early adopters of AI technology rely on external chat interfaces. While powerful, this "copy-paste" workflow introduces friction and disrupts the creative flow. Native integration&mdash;where the AI exists within the text editor itself&mdash;allows creators to remain focused. Instead of switching tabs to generate a summary or check facts, the AI acts as a collaborative partner that understands the context of the current document.</p>
<h3>Key Benefits of Integrated AI</h3>
<ul>
  <li><strong>Contextual Awareness:</strong> AI can analyze existing text to suggest relevant follow-up points or maintain a consistent brand voice.</li>
  <li><strong>Reduced Cognitive Load:</strong> By automating repetitive tasks like formatting and basic proofreading, writers can focus on high-level strategy and storytelling.</li>
  <li><strong>Streamlined Collaboration:</strong> Integrated tools allow teams to brainstorm and refine ideas within a single shared environment, accelerating the approval process.</li>
  <li><strong>Enhanced Accuracy:</strong> When connected to internal knowledge bases, GenAI can provide fact-checking capabilities that generic models lack.</li>
</ul>
<h2>Evaluating Workflow Improvements</h2>
<p>To understand the impact of GenAI integration, it is helpful to compare traditional workflows against AI-enhanced processes. The following table highlights common content tasks and how native AI transforms the output and efficiency for different stakeholders.</p>
<table style="width: 100%; border-collapse: collapse; margin-top: 20px; margin-bottom: 20px; border: 1px solid rgb(206, 212, 217);" border="1">
  <thead>
    <tr>
      <th style="border-color: #ced4d9; background-color: #ecf0f1; width: 26.6364%;">Workflow Task</th>
      <th style="border-color: #ced4d9; background-color: #ecf0f1; width: 35.8714%;">Traditional Method</th>
      <th style="border-color: #ced4d9; background-color: #ecf0f1; width: 37.4922%;">GenAI-Enhanced Method</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="border-color: #ced4d9; width: 26.6364%;"><strong>Drafting</strong></td>
      <td style="border-color: #ced4d9; width: 35.8714%;">Starting from a blank page.</td>
      <td style="border-color: #ced4d9; width: 37.4922%;">AI-generated outlines and initial drafts.</td>
    </tr>
    <tr>
      <td style="border-color: #ced4d9; width: 26.6364%;"><strong>Research</strong></td>
      <td style="border-color: #ced4d9; width: 35.8714%;">Manual searching across multiple tabs.</td>
      <td style="border-color: #ced4d9; width: 37.4922%;">Instant retrieval of internal/external data.</td>
    </tr>
    <tr>
      <td style="border-color: #ced4d9; width: 26.6364%;"><strong>Tone Adjustment</strong></td>
      <td style="border-color: #ced4d9; width: 35.8714%;">Manual rewriting for different audiences.</td>
      <td style="border-color: #ced4d9; width: 37.4922%;">One-click conversion (e.g., Casual to Formal).</td>
    </tr>
    <tr>
      <td style="border-color: #ced4d9; width: 26.6364%;"><strong>Summarization</strong></td>
      <td style="border-color: #ced4d9; width: 35.8714%;">Reading full text and manual condensing.</td>
      <td style="border-color: #ced4d9; width: 37.4922%;">Automated key takeaway generation.</td>
    </tr>
    <tr>
      <td style="border-color: #ced4d9; width: 26.6364%;"><strong>Localization</strong></td>
      <td style="border-color: #ced4d9; width: 35.8714%;">External translation services required.</td>
      <td style="border-color: #ced4d9; width: 37.4922%;">In-editor multilingual support and translation.</td>
    </tr>
  </tbody>
</table>
<h2>Overcoming Adoption Challenges</h2>
<p>While the advantages are clear, implementing GenAI requires a strategic approach. Concerns regarding data privacy, output quality, and the "human touch" are common. <em>To address these, organizations should prioritize tools that offer "human-in-the-loop" functionality</em>. AI should be viewed as an assistant&mdash;a co-pilot that offers suggestions while leaving final editorial control in the hands of the writer.</p>
<p>Furthermore, technical teams must focus on the "integrator" experience. Providing developers with straightforward APIs and pre-built UI components ensures that these advanced features can be deployed quickly <strong>without the risk of building complex AI infrastructure from scratch</strong>. As we look toward the future, the goal is simple: technology that fades into the background, empowering creators to do their best work with less friction.</p>
</textarea>
// Step 1: Set up session - this should be part of the application's user management process.
// Open-source plugins below are only for editing the demo HTML (lists, links, tables). TinyMCE AI options are the focus.
tinymce.init({
  selector: 'textarea#tinymceai-actions',
  height: '800px',
  plugins: ['tinymceai', 'advlist', 'lists', 'link', 'autolink', 'table', 'wordcount'],
  toolbar: 'undo redo | tinymceai-chat tinymceai-review tinymceai-quickactions | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link',
  sidebar_show: 'tinymceai-chat',
  tinymceai_token_provider: async () => {
    return fetch('/api/tinymceai-token', { credentials: 'include' })
      .then(resp => resp.text())
      .then(token => ({ token }));
  },
  tinymceai_chat_fetch_sources: () => Promise.resolve([{
    label: 'TinyMCE resources',
    sources: [
      { id: 'docs', label: 'TinyMCE Documentation', type: 'web-resource' },
      { id: 'blog', label: 'Tiny Blog', type: 'web-resource' },
      { id: 'survey-2023', label: 'State of rich text editing 2023', type: 'web-resource' },
    ]
  }]),
  tinymceai_chat_fetch_source: (id) => {
    const urls = {
      'docs': 'https://www.tiny.cloud/docs/tinymce/latest/',
      'blog': 'https://www.tiny.cloud/blog/',
      'survey-2023': 'https://www.tiny.cloud/developer-survey-results-2023/',
    };
    return Promise.resolve({ type: 'web-resource', url: urls[id] });
  },
  tinymceai_quickactions_custom: [
    {
      type: 'chat',
      title: 'Challenge',
      prompt: 'Challenge statements, verify facts and identify assumptions'
    }
  ],
  tinymceai_languages: [
    { title: 'English', language: 'english' },
    { title: 'Chinese (Simplified)', language: 'chinese' },
    { title: 'Spanish', language: 'spanish' },
    { title: 'German', language: 'german' },
    { title: 'Japanese', language: 'japanese' },
    { title: 'Portuguese', language: 'portuguese' },
    { title: 'Swedish', language: 'swedish' },
    { title: 'Korean', language: 'korean' },
    { title: 'Hindi (Devanagari)', language: 'hindi devanagari' },
    { title: 'Italian', language: 'italian' },
    { title: 'Klingon', language: 'klingon' },
    { title: 'Dothraki', language: 'dothraki' },
  ]
});

Quick Actions and Review

Quick Actions fit transforming a selection or section (for example grammar fixes, translation, or tone). Review fits whole-document quality analysis with suggestions in the Review sidebar and the document.

Both Quick Actions and Review can propose edits that apply only after acceptance or rejection. The main differences are scope and where the work happens in the editor:

  • Quick Actions: Operate on a selection or section (including the full document when the scope includes it). The Quick Actions menu runs one-off operations such as Chat with a pre-filled prompt, preview transformations, translation, and custom actions.

  • Review: Always analyzes the entire document in read-only Review mode. Suggestions appear in the Review sidebar and in the document. See Review for details.

Integration

To start using the Quick Actions feature, first load the TinyMCE AI plugin in the editor configuration. See Plugin Reference for installation and enabling AI features.

Enabling the tinymceai plugin registers Chat, Quick Actions, and Review toolbar controls. Those controls appear on the main toolbar only when the toolbar configuration includes them: the default toolbar (when toolbar is omitted or true) adds tinymceai-chat, tinymceai-quickactions Quick Actions icon, tinymceai-review, and related items; with a custom toolbar value, each control must be listed or it remains hidden.

To show Quick Actions on the Quickbars selection toolbar, add the desired identifiers to the quickbars_selection_toolbar option.

TinyMCE AI Quick Actions dropdown in the toolbar

Finally, individual Quick Actions can also be added to the toolbar as shortcuts for easier access.

For example, add the ai-quickactions-improve-writing Improve Writing icon button, or the ai-chat-explain Explain icon button (find it in the demo above). Whole categories can be added to the toolbar as well. Learn more about available actions.

The final example configuration looks as follows:

tinymce.init({
  selector: '#editor',
  plugins: 'tinymceai',
  toolbar: 'undo redo tinymceai-chat tinymceai-quickactions tinymceai-review | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
  tinymceai_quickactions_menu: [
    'ai-quickactions-chat-prompts',
    'ai-quickactions-improve-writing',
    'ai-quickactions-continue-writing',
    'ai-quickactions-check-grammar',
    'ai-quickactions-change-length',
    'ai-quickactions-change-tone',
    'ai-quickactions-translate'
  ],

  // Configure a sub-menu (e.g., chat commands)
  tinymceai_quickactions_chat_prompts: [
    'ai-chat-explain',
    'ai-chat-summarize',
    'ai-chat-highlight-key-points'
  ],
  // Required for authentication
  tinymceai_token_provider: () => {
    return fetch('/api/token').then(r => r.text()).then(token => ({ token }));
  }
});

AI controls are not added to the quickbars_selection_toolbar automatically; add the desired toolbar button identifiers to that option when they should appear there.

For example:

tinymce.init({
  selector: 'textarea#editor',
  plugins: 'quickbars tinymceai',
  quickbars_selection_toolbar: 'tinymceai-quickactions bold italic',
});

Types of actions

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

  • Chat actions, such as "Explain" or "Summarize", open the Chat interface with the selected text added as context and automatically start the conversation with a pre-filled prompt.

  • Preview actions such as Continue writing, Make shorter, Improve writing, and Fix grammar show a preview of your document where suggested edits appear so you can review them and apply or skip each change.

Custom actions let integrators define whether each action opens Chat or shows a preview. See Custom Actions.

Default Actions

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 Quick Actions icon (tinymceai-quickactions) or individually when selected by the integrator in the editor toolbar configuration. Whole action categories can be added to the toolbar as well.

Custom actions can be added to the list, and default actions can be removed or reordered by configuring tinymceai_quickactions_menu. See Configuring Quick Actions menu.

The following table lists built-in Quick Actions.

  • The Editor column is the label in the Quick Actions menu when that action is available in the editor.

  • The Menu or control ID column lists values for tinymceai_quickactions_menu, tinymceai_quickactions_chat_prompts, tinymceai_quickactions_change_tone_menu, and the toolbar when adding individual controls (see Configuring Quick Actions menu).

  • The System actionName or quick-action prompt id column is the service identifier. Preview actions use a system actionName with the Actions API. Chat actions use a quick-action prompt id and Chat with a pre-filled prompt, not the system actions API.

Editor Menu or control ID System actionName Description Editor UI API

Explain

ai-chat-explain

explain

Opens Chat with the selected text and a pre-filled prompt. Uses the Conversations API, not the system actions path.

✓

—

Summarize

ai-chat-summarize

summarize

Opens Chat with a summarize prompt. Uses the Conversations API, not the system actions path.

✓

—

Highlight key points

ai-chat-highlight-key-points

highlight-key-points

Opens Chat with a key-points prompt. Uses the Conversations API, not the system actions path.

✓

—

Improve Writing

ai-quickactions-improve-writing

improve-writing

Enhance clarity, word choice, and sentence structure.

✓

✓

Continue Writing

ai-quickactions-continue-writing

continue

Complete unfinished sentences, paragraphs, or entire documents.

✓

✓

Fix Grammar

ai-quickactions-check-grammar

fix-grammar

Correct grammar, spelling, and punctuation errors.

✓

✓

Adjust length

ai-quickactions-change-length

make-shorter, make-longer

Shorten or lengthen the selection. Each option is its own system action.

✓

✓

Adjust Tone

ai-quickactions-change-tone
ai-quickactions-tone-casual
ai-quickactions-tone-direct
ai-quickactions-tone-friendly
ai-quickactions-tone-confident
ai-quickactions-tone-professional

make-tone-casual
make-tone-direct
make-tone-friendly
make-tone-confident
make-tone-professional

Change writing style; each menu option maps to its own system action.

✓

✓

Translate

ai-quickactions-translate
ai-quickactions-translate-english
ai-quickactions-translate-spanish
ai-quickactions-translate-russian
ai-quickactions-translate-swedish
ai-quickactions-translate-german
ai-quickactions-translate-japanese
ai-quickactions-translate-portuguese
ai-quickactions-translate-korean
ai-quickactions-translate-italian
ai-quickactions-translate-chinese

translate

Convert content between languages. Request body uses args: { language: string } with values such as english, spanish, russian, swedish, german, japanese, portuguese, korean, italian, or chinese. Configure the editor submenu with tinymceai_languages.

✓

✓

  • A checkmark in the Editor UI column means the action can appear when included in tinymceai_quickactions_menu (and related sub-menu options such as tinymceai_quickactions_chat_prompts).

  • A checkmark in the API column means the action is invoked through the system Actions API path /v1/actions/system/{actionName}/calls. An em dash means the command is Chat-based and uses the Conversations API instead.

For system action endpoints, schemas, and streaming details, see the Actions API reference.

Custom Actions

The tinymceai_quickactions_custom configuration property allows adding new commands to the Quick actions feature. The items can be of type action (a quick action that shows a preview of the editor content with AI suggestions so changes can be reviewed before applying) or type chat (which opens the chat interface for a conversation related to the prompt and selection). The title is used in the menu items, while the prompt is what is actually sent to the AI. The model is required for action type commands. Learn more about types of actions.

tinymce.init({
  selector: '#editor',
  plugins: 'tinymceai',
  toolbar: 'tinymceai-quickactions',
  // Required for authentication
  tinymceai_token_provider: () => {
    return fetch('/api/token').then(r => r.text()).then(token => ({ token }));
  },
  tinymceai_quickactions_custom: [
    {
      title: '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',
      model: 'gemini-2-5-flash'
    },
    {
      title: 'Summarize in 5 bullet points',
      prompt: 'Summarize the selected text in 5 bullet points.',
      type: 'chat'
    },
    {
      title: 'Rewrite adding more sarcasm',
      prompt: 'Rewrite using a sarcastic tone.',
      type: 'action',
      model: 'gemini-2-5-flash'
    }
  ]
});

Configuring Quick Actions menu

Which actions appear in the Quick Actions menu can be configured by specifying the list of actions to include. The tinymceai_quickactions_menu configuration option controls the main menu items.

Sub-menus have their own configuration options:

  • tinymceai_quickactions_chat_prompts: Controls items in the "Chat commands" sub-menu

  • tinymceai_quickactions_change_tone_menu: Controls items in the "Change tone" sub-menu

  • tinymceai_languages: Controls languages in the "Translate" sub-menu

tinymce.init({
  selector: '#editor',
  plugins: 'tinymceai',
  toolbar: 'tinymceai-quickactions',
  // Required for authentication
  tinymceai_token_provider: () => {
    return fetch('/api/token').then(r => r.text()).then(token => ({ token }));
  },
  // Configure the main Quick Actions menu
  tinymceai_quickactions_menu: [
    'ai-quickactions-chat-prompts',
    'ai-quickactions-improve-writing',
    'ai-quickactions-continue-writing',
    'ai-quickactions-check-grammar',
    'ai-quickactions-change-length',
    'ai-quickactions-change-tone',
    'ai-quickactions-translate',
    'ai-quickactions-custom'
  ],
  // Configure a sub-menu (e.g., chat commands)
  tinymceai_quickactions_chat_prompts: [
    'ai-chat-explain',
    'ai-chat-summarize',
    'ai-chat-highlight-key-points'
  ]
});

Actions API

The Quick Actions plugin feature is built on top of the Actions API, which provides REST API access to action functionality. Actions are fast, stateless operations—each request is independent, as described under Stateless actions. For suggestions that change the document, the preview flow applies edits only after each suggestion is accepted or rejected. Actions that only open Chat with a pre-filled prompt use the Conversations API; see Chat.

Actions use streaming output with Server-Sent Events for real-time feedback as results are generated.

System Actions

Built-in Quick Actions—including identifiers, descriptions, and whether each command uses the system Actions API or Chat (Conversations API)—are summarized in Default Actions.

For endpoint details, request and response schemas, authentication, and streaming behavior for system actionName calls, see Actions API.

Custom Actions through the API

In addition to system actions, custom actions can be created for specific use cases through the API. Custom actions allow specialized content transformations using custom prompts to control AI behavior.

Unlike system actions that use default identifiers, custom actions use a unified endpoint where the transformation behavior is defined through a prompt parameter. See Actions API for the custom actions endpoint and implementation details.

Custom actions require the ai:actions:custom permission in the JWT token.

Streaming Responses

Actions use Server-Sent Events (SSE) for real-time streaming results. See the Streaming Responses guide for detailed implementation information.

API Reference

The Actions API reference (interactive OpenAPI documentation) is the full source for system and custom action endpoints, request and response schemas, authentication, worked examples, and streaming action responses.

  • AI Chat: For interactive discussions with document analysis and context.

  • AI Review: For content quality analysis and improvement suggestions.