peteheaney / dewidow
A Twig filter for Craft CMS 3 to remove text widows
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0-RC1
- mundschenk-at/php-typography: ^6.1.0
This package is auto-updated.
Last update: 2024-10-20 04:17:44 UTC
README
A Twig filter for Craft 3 to remove text widows.
By replacing the space between the last two words in a string with
, this filter will prevent widows on any field containing text.
Requirements
This plugin requires Craft 3.
Installation
To install the plugin:
-
open your terminal and go to your Craft project:
cd /path/to/project
-
tell Composer to load the plugin:
composer require peteheaney/dewidow
-
In the Control Panel, go to Settings → Plugins and click the "Install" button for DeWidow.
Using DeWidow
Simply add the dewidow
filter to any field containing text and it will remove widows from the text.
{{ myTextField | dewidow | raw }}