Editing the article "Acme Cloud launch notes" in CKEditor 5 on Claro. Passages are underlined by level: dotted blue for suggestions, wavy amber for warnings. A card opened on the word "utilize" names the level, Warning, says: Try "use" instead of "utilize", explains why, links to Learn more, and offers Change to "use", Ignore and Report as wrong. The Writing summary in the sidebar counts 2 warnings and 5 suggestions.
The Writing summary card from the edit form's sidebar: 2 warnings and 5 suggestions in total, then the Body field with its own counts and a readability line, "Grade 12, target 9: 2 sentences to shorten", followed by links to the two sentences to shorten, each of which moves the cursor to that sentence in the editor.
The Terms page of the style guide, with tabs for Settings, Coverage, Rules, Terms, Packs, Import and AI rewrites. A row of status badges counts the terms (Preferred 3, Admitted, Use carefully, Deprecated, Forbidden and Pending 1 each). Below an Add a term form and filters, a table lists 8 made-up terms such as Acme Cloud (preferred, mistakes acme-cloud and AcmeCloud), Acme Widget (forbidden, use Acme Sensor) and Northwind Box (deprecated, use Northwind Hub), with each term's activity, such as 3 flagged.
The site-wide Writing report, with Report and Scan content tabs: 20 findings in 4 items (3 errors, 6 warnings, 11 suggestions), the most frequent rules by name, a Download as CSV button, and filters by entity type, content type, level, rule and author. The table lists each finding with its content, type, language, field, a level badge, the rule, the message, the matched text and when it changed, such as "utilize" in the article "Acme Cloud launch notes" with the suggestion to use "use".
A publish refused by the writing gate. Saving "Acme Widget recall notice" as published returns an error message listing the forbidden term "Acme Widget" in the title and body, with the fix "Acme Sensor". An "I need to publish this anyway" box asks for a reason that is logged. The title's own list offers Change to "Acme Sensor", and the summary card shows 3 errors under a "Blocks publishing" notice.

This project is not covered by Drupal’s security advisory policy.

Enhanced Writing Manager (EWM) turns your style guide into rules your editors own. It checks terminology, plain language, readability and, if you want it, inclusive language while authors type, offers one-click fixes, can hold back content with errors from being published, and keeps a site-wide report. It runs in PHP and plain JavaScript: nothing to install on the server and no outside service.

Status: no release yet. The 1.0.x branch is under active development toward 1.0.0, and settings and interfaces may still change, so it is not yet for production sites. Its automated tests pass on Drupal 10.3, 11.4 and the Drupal 12.0 release candidate.

Part of the Enhanced Manager Suite

The Enhanced Manager modules each rework one part of Drupal's admin and work on their own: install only the ones you need. Enhanced Manager Suite adds one dashboard that shows which of them are installed and links to each, and status blocks with each one's health.

Features

Useful the minute it is installed

  • Six rule packs, written for this module: plain language, clarity, readability and consistency are on; inclusive language is installed but off until you choose it; terminology starts empty for your own terms. 130 rules in all, each with examples it must flag and must leave alone.
  • No starter rule is an error, so nothing blocks saving until you decide it should.
  • Every text field of content and Paragraphs is checked by default, titles and summaries included. One Coverage page lists every content entity type, bundle and text field, to turn fields on or off, hide quieter levels, set a reading grade target, or change one rule's level in one field.
  • A starter recipe gives the Content editor role the checks, the style guide and the report in one step.

Editors own the rulebook

  • Rules and terms are configuration, edited in the admin UI by people with the Manage the style guide permission, and exported with the rest of your configuration. No deployment is needed to change a word.
  • Each rule has a type, a level (suggestion, warning or error), a message, a reason, an optional link to your style guide and a one-click fix. Its examples run every time it is saved, and a failing example stops the save.
  • A Test tab tries a rule on your own text, and Preview on content shows what it would flag in recent content before you turn it on.
  • The rules list shows how often each rule flagged text and how often people dismissed it, so noisy rules stand out.
  • Rule types: existence, substitution, occurrence, repetition, consistency, conditional, capitalization and readability metrics. Patterns are regular expressions that run the same on the server and in the browser.

Terminology

  • Terms with the statuses preferred, admitted, use carefully, deprecated, forbidden and pending, a replacement, variants, common mistakes, exact capitals (optionally except at the start of a sentence), a description, an example, tags and a language.
  • A forbidden term is an error, a deprecated term a warning, and a "use carefully" term a suggestion with its description; each offers its replacement as a fix.
  • CSV import with a preview of what will be created, updated and skipped, and CSV export.
  • Editors who manage the style guide can accept a term straight from a finding.

While authors write

  • Findings are marked in CKEditor 5 and listed under titles and plain text fields. Marks are never written into the saved text.
  • Each finding's card gives the message, the reason, a link to your style guide, a one-click fix, Fix all for the same rule in the field, Ignore, and Report as wrong.
  • Ignore for yourself, for one passage or the whole page, or for everyone with a separate permission. Ignoring an error asks for a reason, which is kept.
  • A Writing summary on the form counts findings by level, says when errors would stop publishing, and shows each field's reading grade against its target with the sentences to shorten.
  • Readability that names the fix: long sentences, long paragraphs, long stretches without a heading, passive voice, long words and repeated sentence starts, with limits you set.
  • Keyboard: Alt+Shift+N and Alt+Shift+P move between marks and open their cards, and Escape returns to the text. The keys are listed in CKEditor's own keyboard help. Levels are shown in words and icons, not only color.
  • Text is checked in a Web Worker in the browser and falls back to the server; the server checks every save in any case.

Publishing gates

  • Errors (or warnings and errors) block publishing. By default drafts always save and only the save that would publish is stopped; you can block every save instead.
  • With Content Moderation, each transition can be set to Off, Warn or Prevent.
  • Only new errors block: an error the live page already shows does not stop an urgent fix.
  • People with Publish despite writing errors can save past the gate after giving a reason, which is logged with their name.
  • The same gate applies to the edit form, Content Moderation's Change to control, revision reverts, JSON:API and REST, the Publish content bulk action, Scheduler and publishing a workspace. JSON:API answers 422 with a pointer to the field, and returns the findings of every write it checks in meta.ewm.
  • Translations and Paragraphs are checked with the content they belong to, and errors in fields the form does not show are named.

Across the site

  • A writing report (with Views) lists findings in all saved content, filtered by entity type, content type, level, rule, language and author, with a streamed CSV download that says so if it stops early.
  • Every save and delete keeps the report up to date, migrations and imports included, through a queue when there are many.
  • Scan content in a batch, or with the Check writing of content bulk action.
  • Drush: ewm:lint checks saved content, ewm:check checks a text or one item, ewm:rules lists the rules in force and ewm:import imports a Vale style. Lint and check exit with code 1 on errors, for CI jobs.

Vale styles

  • Import a Vale style from a zip or an https address, with a preview of the rules that will be imported and the ones skipped, each with the reason.
  • Existence, substitution, occurrence, repetition, consistency, conditional, capitalization and Flesch-Kincaid rules are translated; patterns are rewritten into a dialect PHP and JavaScript share, or refused with a clear message. accept.txt and reject.txt become terms.
  • Only MIT, BSD, ISC and CC0 packages are imported, and their licence text is kept with the pack. Imported packs start off, so you can review them first.

AI rewrites, optional

  • The Enhanced Writing Manager AI submodule uses the AI module to offer rewrites of one flagged sentence or passage.
  • Only that passage, the rule it breaks and the style guide terms in it are sent, and only from fields an administrator allows. None are allowed on install.
  • Each rewrite is checked by your rules before it is shown; one that still breaks the rule as an error is dropped. Nothing is applied without a person, and Undo brings back the old text.
  • A monthly limit on AI calls for the whole site, and a log of who asked, from which field and how much was sent. The log never stores the text.

Built to be trusted

  • Every rule runs with a time and backtracking limit, so a bad pattern cannot hang a save. A rule that runs out on a very long text is skipped and named.
  • The endpoints the editor uses are rate limited and need a CSRF token. The report and its CSV never quote text from content a person may not view.
  • No third-party rules ship with the module: the starter packs are original writing, and Vale styles are imported by your site under their own licence.

Requirements

  • Required: Drupal core ^10.3 || ^11 || ^12 and PHP 8.3 or later.
  • Required: the core Field and Text modules. No contributed modules.
  • Required for checks while typing: JavaScript in the browser. Saves are checked on the server either way.
  • Optional: the core Views module for the writing report, CKEditor 5 for marks in formatted text, Content Moderation for a gate per transition, Workspaces and JSON:API.
  • Optional: Paragraphs, whose text is checked with its host, and Scheduler, whose publishing is gated.
  • Optional: the PHP zip extension, to import Vale styles. Drush 13, for the commands.
  • Optional, for the AI submodule: Drupal 10.5, 11.2 or later, and the AI module 1.5.0 or later with a chat provider.

Installation

  • Add the module with Composer. Until the first release, use the development branch: composer require 'drupal/ewm:1.0.x-dev@dev'
  • Enable it: drush en ewm. Or apply the starter recipe from the Drupal root, which also enables it: drush recipe modules/contrib/ewm/recipes/ewm_starter
  • To see it work, add an article and type "We will utilize the the new form in order to save time." Three marks appear, each with a fix.

Configuration and permissions

Settings are at Configuration » Content authoring » Enhanced Writing Manager (/admin/config/content/ewm), with tabs for Settings, Coverage, Rules, Terms, Packs and Import. The writing report is at Reports » Writing report (/admin/reports/ewm). The status report says which packs are on and how many fields are checked.

  • Administer Enhanced Writing Manager (restricted): settings, coverage, publishing gates, packs and Vale import.
  • Manage the style guide (not restricted): add, edit and delete terms and rules, and accept a term from a finding. Rules include their levels, so this can make a rule block publishing.
  • See writing checks while editing (not restricted): marks, fixes and readability while typing. No role gets it on install; the starter recipe gives it to Content editor.
  • Dismiss findings for everyone (not restricted): hide a finding for every author, which also lets a save past the gate.
  • Publish despite writing errors (restricted): save or publish with errors after giving a reason that is logged.
  • View the writing report (not restricted): see and export findings across all content. Text from content the person may not view shows as "(no access)".
  • Scan content for findings (not restricted): scan content types and use the bulk action.
  • Ask AI for rewrites of flagged passages (not restricted, AI submodule): send one flagged passage from an allowed field to the AI provider.

The README and the docs folder cover editing, gates, terms, Vale import, AI, the API and performance, and describe every starter rule.

Similar projects

  • Vale is a well-built module that runs the Vale command-line linter, with live marks in CKEditor 5, a publishing check and a report. It needs the Vale program on every web server and anywhere Drush runs, and its rules live as files in your codebase. Choose it if you already keep Vale styles in your repository and want every Vale check type, including spelling. EWM needs only PHP, keeps rules and terms in configuration editors change in the UI, and can import most Vale styles.
  • Editoria11y runs accessibility tests while authors write. EWM runs no such tests; it checks the wording. The two cover different jobs.
  • Real-time SEO puts an SEO and readability analysis in the edit form. Choose it for SEO. EWM's readability points at the sentences and paragraphs to fix, against a grade target per field, and adds terminology and gates.
  • Content Moderation Checklist holds moderation transitions until editors tick a checklist by hand. EWM's gates act on what the text says, per transition.

Support and maintenance

Report bugs and ask for features in the issue queue. Each release has notes describing what changed.

This project is not covered by Drupal's security advisory policy. Until it is, security issues are handled in the public issue queue and fixed in ordinary releases.

Maintainer

Created and maintained by deadnorth at Dead North, which also takes on custom Drupal work. If this module saves you time, you can buy me a coffee.

Project information

Releases