Drupal is a registered trademark of Dries Buytaert

browser_ai_ckeditor

2 sites No security coverage
View on drupal.org

Integrate Chrome's built-in AI APIs directly into CKEditor 5. This module provides local, AI-powered toolbar buttons for rewriting, summarizing, proofreading, and content generation without external API keys.

Features

This module leverages the experimental AI capabilities built directly into Google Chrome (Gemini Nano), allowing for on-device AI processing. This means no API keys, no monthly subscription costs, and improved privacy as data is processed locally in the browser.

Key Functionality:

  • AI Rewrite: Rewrites selected text to improve clarity, tone, and style.
  • AI Summarize: Condenses long passages of selected text into concise summaries.
  • AI Proofread: automatically detects and corrects grammar, spelling, and punctuation errors.
  • AI Write for Me: Generates new content based on a simple topic or prompt you provide.

Post-Installation

Once the module is installed, you need to add the buttons to your editor:

  1. Navigate to Administration > Configuration > Content authoring > Text formats and editors.
  2. Configure the text format you wish to use (e.g., Full HTML).
  3. Ensure you are using CKEditor 5.
  4. Drag the AI toolbar buttons (Rewrite, Summarize, Proofread, Write for Me) from the Available buttons list to the Active toolbar.
  5. Save the configuration.

How to use:

  • For Rewrite/Summarize/Proofread: Select text in the editor and click the corresponding button.
  • For Write for Me: Place your cursor where you want text, click the button, enter a prompt, and click "Generate."

Additional Requirements

Critical: Browser Requirements This module relies on experimental features found only in Google Chrome (version 128+). It will not work in Firefox, Safari, or Edge. If a user accesses the editor in an unsupported browser, the buttons will be disabled, but the editor will function normally.

Enabling Chrome AI Flags: You must manually enable the AI APIs in your Chrome browser for this module to function:

  1. Open Chrome and navigate to chrome://flags
  2. Search for and enable the following flags:
    • #optimization-guide-on-device-model → Set to "Enabled BypassPerfRequirement"
    • #prompt-api-for-gemini-nano → Set to "Enabled"
    • #summarization-api-for-gemini-nano → Set to "Enabled"
    • #writer-api-for-gemini-nano → Set to "Enabled"
    • #rewriter-api-for-gemini-nano → Set to "Enabled"
  3. Restart Chrome completely.

Similar projects

Most other AI modules for Drupal (such as the generic OpenAI module) require a paid subscription to an external service (like OpenAI or Anthropic) and require sending your data to a remote server.

Browser AI CKEditor differentiates itself by using the User's Browser to do the work. It is free to use and runs "on-device."

Troubleshooting

  • Buttons are greyed out/disabled: Ensure you are using Chrome 128+ and have restarted the browser after enabling the specific flags listed in "Additional Requirements."
  • AI operations fail: The first time you use a feature, Chrome may need to download the AI model. Ensure you have an internet connection and sufficient disk space. Check chrome://on-device-translation-internals/ for model status.

Maintainers

Activity

Total releases
1
First release
Dec 2025
Latest release
3 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.0 Stable Dec 2, 2025