Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

MaxLength Words

Security covered Under active development 2 sites

This module allows editors to limit text fields by the number of words instead of characters. It extends the MaxLength module with a live word counter and an optional hard word limit, ensuring content adheres to editorial guidelines written in words.

MaxLength Words lets editors limit a text field by number of words instead of number of characters. It extends the MaxLength module with a live word counter and an optional hard word limit.

Features

  • Adds a "MaxLength: count" option (Characters / Words) next to the existing MaxLength widget settings.
  • A live word counter replaces MaxLength's character counter, with the same markup and styles (warning and error states).
  • Reuses the MaxLength limit and counter message, so there is nothing new to learn.
  • Milestones (5 words left, 0 left, limit exceeded) are announced to screen reader users.
  • With "Hard limit" enabled, plain text inputs are trimmed while typing, and the limit is also enforced on form submit, including CKEditor 5 fields.
  • HTML tags are not counted, and stand-alone punctuation such as & or - is not a word.
  • Works with text (plain and formatted), text with summary, string and link widgets.

Typical use cases: summaries, teasers, abstracts, bios or captions where editorial guidelines are written in words ("max 50 words") rather than characters.

Post-Installation

There is no separate configuration page. Everything is set per field widget:

  1. Go to "Manage form display" of an entity bundle, for example Structure » Content types » Article » Manage form display.
  2. Open the settings of a supported widget.
  3. Set a MaxLength limit as usual, then set "MaxLength: count" to "Words".
  4. Save the widget settings and the form display.

Fields left on "Characters" (or "- None -") keep working exactly as with MaxLength alone.

Additional Requirements

None.

Similar projects

MaxLength counts characters only. This module does not replace it; it adds word counting on top of it, so existing MaxLength settings, styles and messages are reused.

Drupal 10–11

Ask your assistant about MaxLength Words

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Oct 2026
Latest release
3 weeks ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1 Stable 10–11 Oct 30, 2026
1.0.0 Stable 10–11 Oct 20, 2026
1.0.0-beta2 Pre-release 10–11 Oct 12, 2026
1.0.0-beta1 Pre-release 10–11 Oct 10, 2026
1.0.0-alpha2 Pre-release 10–11 Oct 7, 2026
1.0.0-alpha1 Pre-release 10–11 Oct 6, 2026