Plugin screenshot thumbnail 1/4
Plugin screenshot thumbnail 2/4
Plugin screenshot thumbnail 3/4
Plugin screenshot thumbnail 4/4

Soft Hyphen for Craft CMS

Adds soft hyphen (­) and non-breaking space ( ) insert buttons to CKEditor fields, Plain Text fields, and the entry Title field in Craft CMS.

  • Soft hyphens are invisible characters that hint the browser where it can break a word across lines. When the break happens, a hyphen is shown. Useful for long words in narrow columns or responsive layouts.
  • Non-breaking spaces prevent line breaks between two words. Useful for keeping units together (e.g. "100 km") or after short prepositions.

Requirements

  • Craft CMS 4.0+
  • CKEditor plugin 4.0+ (for CKEditor support)

Installation

composer require frontend-services/craft-soft-hyphen
php craft plugin/install soft-hyphen

CKEditor fields

The plugin automatically injects itself into every CKEditor instance. No config pasting required.

To give editors a clickable toolbar button:

  1. Go to Settings → CKEditor and open your config
  2. Drag Soft Hyphen and/or Non-Breaking Space into your toolbar
  3. Save

In the editor both characters are shown as visible markers so editors can see and manage them. On the frontend the markers are automatically replaced with real ­ and   characters. No frontend JavaScript or template changes needed.


Plain Text fields

Each Plain Text field can independently have the insert buttons enabled.

  1. Go to Settings → Fields and open a Plain Text field
  2. Toggle Soft Hyphen / NBSP buttons on
  3. Save the field

Two small buttons will appear next to the input in the entry editor, inserting the characters at the cursor position.


Title field

To show the insert buttons next to the title field on all entries:

  1. Go to Settings → Soft Hyphen
  2. Toggle Title field buttons on
  3. Save

How visible proxy characters work

Because &shy; and &nbsp; are invisible in plain <input> and <textarea> fields, the plugin displays them as visible stand-ins while editing:

Stored in databaseShown in the CP editor
soft hyphen \u00ADmiddle dot ·
non-breaking space \u00A0open box

These proxy characters are only used for display — they are never saved to the database. When an entry is saved, the plugin automatically converts them back to the real &shy; and &nbsp; characters server-side before the value is persisted.

Standard

Plus $19/year after one year.

Installation Instructions

To install this plugin, copy the command above to your terminal.

Reviews

This plugin doesn't have any reviews.

Active Installs
2
Version
1.1.3.2
License
Craft
Compatibility
Craft 4, Craft 5
Last release
March 5, 2026
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs