Wrap Word

Categories

Component ID

2496335

Component name

Wrap Word

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

199

Component created

Component changed

Component body

What does the module do?

The Wrap Word module allows a user to create a text format that wraps a word (determined by position) in HTML tags.

Before

This is a test.

After

<span>This</span> is a test.

This can be achieved by specifying a span tag to wrap the first word.

The module also allows the user to specify classes for the HTML tags.

Example Use Case

Requirement

To display an icon always at the end and inline with a piece of text.

The Solution

Use the Wrap Word module to attach a text format to a field which allows the last word to be wrapped in a pair of <span> tags and thus becomes selectable by CSS seen in this approach:
http://stackoverflow.com/questions/16100956/prevent-after-element-from-w...

Current Settings

Tags Supported

<div>
<p>
<span>

Positions Supported

first
last