A Twig filter for Craft 3 to remove text widows
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.craftplugin
.gitignore
LICENSE.md
README.md
composer.json

README.md

DeWidow plugin for Craft 3

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 }}