Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module automatically applies language-specific typography rules to your content using client-side JavaScript. It ensures correct spacing around punctuation and units without altering your database content, making it clean and portable. The module supports multiple languages with configurable rules and selectors, automatically processing content loaded after the initial page render.

The Non-Breaking Space Title module automatically applies language-specific typography rules to your content using client-side JavaScript. It ensures proper spacing around punctuation marks, quotes, and units without modifying your database content, keeping your data clean and portable across different contexts (APIs, exports, search).

Features

  • Multi-language support: Configure different typography rules for each active language on your site
  • Client-side processing: Rules are applied via JavaScript, keeping your database content clean and portable
  • Configurable selectors: Choose which CSS selectors to target (titles, headings, content areas, etc.)
  • Per-language rules: Define regex patterns and replacements tailored to each language's typography conventions
  • Pre-configured rules: Includes default rules for English (em dashes) and French (non-breaking spaces before punctuation, French quotes, units)
  • Dynamic content support: Uses MutationObserver to automatically process content loaded after page load
  • Permission-based access: Dedicated permission for managing typography rules

Use cases:

  • Multi-language sites requiring different typography rules per language
  • Publications that need to maintain clean, portable content in the database
  • Sites that want to enforce typography standards without manual editing

Post-Installation

  1. Enable the module: Install and enable via Drush (drush en nbsp_title) or the Extend page
  2. Clear cache: Run drush cr to register the new permission
  3. Set permissions: Go to /admin/people/permissions and assign the "Administer Non breaking space title" permission to appropriate roles
  4. Configure rules: Navigate to Configuration → User interface → Non breaking space title (/admin/config/regional/nbsp-title)
  5. Configure selectors: Add CSS selectors (one per line) for elements where rules should apply. Default selectors include .node__title, .page-title, h1, h2, h3h4
  6. Add language rules: For each active language, add typography rules with:
    • Description: Explanation of what the rule does
    • Pattern: JavaScript regular expression (e.g., \s+([:\;!\?]))
    • Replacement: Replacement string (e.g.,  $1 - will be converted to Unicode non-breaking space)

The module automatically applies rules based on the current language context

Additional Requirements

  • Drupal: Core 10, or 11
  • No additional libraries required: Uses vanilla JavaScript and Drupal core APIs

This module works standalone but complements:

  • Language modules: Works seamlessly with Drupal's core language and translation systems
  • Content translation: Automatically applies appropriate rules based on content language

Supporting this Module

This module is maintained as part of ongoing Drupal development work. Contributions, bug reports, and feature requests are welcome on the project issue queue.

Community Documentation

  • Issue queue: Report bugs and request features on Drupal.org
  • Examples: See the module's configuration page for pre-configured typography rules for French and English

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Feb 2026
Latest release
6 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.0-alpha1 Pre-release 9–11 Feb 27, 2026