Download the PHP package kesabr/kirby-soft-hyphen without Composer
On this page you can find all versions of the php package kesabr/kirby-soft-hyphen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kesabr/kirby-soft-hyphen
More information about kesabr/kirby-soft-hyphen
Files in kesabr/kirby-soft-hyphen
Package kirby-soft-hyphen
Short Description Helper to use a designated character in the panel to create a soft hyphen in the frontend
License MIT
Informations about the package kirby-soft-hyphen
Kirby Soft Hyphen
Take control of hyphenation — place soft hyphens exactly where you want them, right from the panel. Soft hyphens are invisible in the browser but tell the browser to break and hyphenate at that position when the line is too long. No more relying on automatic hyphenation algorithms that break words in the wrong place.
The plugin adds a soft hyphen button to the Writer toolbar.
Installation
Via Composer:
Manual: Drop the kirby-soft-hyphen folder into site/plugins/ of your Kirby project.
Features
- A soft hyphen button for the Writer field.
- Soft hyphens are highlighted inside the Writer.
->softHyphen()field method to clean soft hyphen markup before frontend output.||shorthand for inserting soft hyphens in text and textarea fields.
Usage
Writer field
Add softHyphen to the marks list of any writer field in your blueprint:
Field method ->softHyphen()
Call ->softHyphen() on any field before outputting it in a template:
Writer fields — The writer stores soft hyphens wrapped in <span class="k-shy"> for editor visibility. ->softHyphen() strips those spans so only the bare entity remains in the frontend HTML. The soft hyphens technically work even without this call (the entity is already inside the span), but calling it keeps your markup clean.
Text / textarea fields — Type || where you want a soft hyphen. ->softHyphen() is required to convert || → in the output.
All versions of kirby-soft-hyphen with dependencies
getkirby/cms Version ^4.0 || ^5.0
getkirby/composer-installer Version ^1.1