peteheaney/dewidow

A Twig filter for Craft CMS 3 to remove text widows

Installs: 21

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:craft-plugin

pkg:composer/peteheaney/dewidow

1.0.0 2018-01-24 21:08 UTC

This package is auto-updated.

Last update: 2025-09-20 06:52: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:

  1. open your terminal and go to your Craft project:

    cd /path/to/project

  2. tell Composer to load the plugin:

     composer require peteheaney/dewidow
    
  3. 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 }}