[Tracker]
Update Summary: [One-line status update for stakeholders]
Short Description: All AI CKEditor plugins display "You must select some text before you can summarize it" even when the active plugin is Translate, Tone, or SpellFix.[One-line issue summary for stakeholders]
Check-in Date: 02/24/2026
Metadata is used by the AI Tracker. Docs and additional fields here.
[/Tracker]

Problem/Motivation

Most AI CKEditor plugins (e.g., Translate, Tone, SpellFix, etc.) require selected text in order to operate.

If no text is selected, a validation message is displayed. However, the message is currently hardcoded in AiCKEditorPluginBase.php and reads:

"You must select some text before you can summarize it."

This message is shown for all plugins, including:

- Translate
- Tone
- SpellFix
- Others extending AiCKEditorPluginBase

This results in incorrect and confusing UX. For example:

- The Translate plugin should display:
"You must select some text before you can translate it."
- The Tone plugin should display:
"You must select some text before you can alter its tone."
- SpellFix should display:
"You must select some text before you can fix spelling."

Steps to reproduce (required for bugs, but not feature requests)

Please provide information like AI modules enabled, which AI provider, browser, etc.

1. Enable the following modules:
- AI (core)
- AI CKEditor (submodule)
2. Configure any AI provider (e.g., OpenAI, Anthropic, etc.).
3. Add an AI CKEditor plugin (e.g., Translate) to a text format toolbar.
4. Open a node edit form using that text format.
5. Click the AI plugin button without selecting any text.

Result:
The message displayed is:
"You must select some text before you can summarize it."

Proposed resolution

The message should reference the correct plugin action (e.g., translate, alter tone, fix spelling).

Remaining tasks

Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)

NA

Issue fork ai-3575346

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

annmarysruthy created an issue. See original summary.

annmarysruthy’s picture

Assigned: annmarysruthy » Unassigned
Status: Active » Needs review
svendecabooter’s picture

Status: Needs review » Reviewed & tested by the community

That makes sense. Merge request looks good to me.