Skip to content

ProcessWire TextformatterMakeLinks takes a block of text and converts all URLs into HTML links

Notifications You must be signed in to change notification settings

phlppschrr/TextformatterMakeLinks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

TextformatterMakeLinks for ProcessWire

This Textformatter module is just a wrapper around the method fHTML::makeLinks from flourishlib (http://flourishlib.com/api/fHTML#makeLinks)

The following description is basically just slightly modified copy from the official flourishlib documentation (http://flourishlib.com/docs/fHTML):

The Textformatter will parse through a string and create HTML links out of anything that resembles a URL or email address, as long as it is not already part of an tag.

Here is an example of it in action:

If you put this text into a textarea inputfield which uses this textformatter

Example 1: www.example.com.
Example 2: https://example.com.
Example 3: [email protected].
Example 4: ftp://john:[email protected].
Example 5: www.example.co.uk.
Example 6: [email protected].
Example 7: <a href="http://example.com">http://example.com</a>.

The output would be:

Example 1: <a href="http://www.example.com">www.example.com</a>.
Example 2: <a href="https://example.com">https://example.com</a>.
Example 3: <a href="mailto:[email protected]">[email protected]</a>.
Example 4: <a href="ftp://john:[email protected]">ftp://john:[email protected]</a>.
Example 5: <a href="http://www.example.co.uk">www.example.co.uk</a>.
Example 6: <a href="mailto:[email protected]">[email protected]</a>.
Example 7: <a href="http://example.com">http://example.com</a>.

About

ProcessWire TextformatterMakeLinks takes a block of text and converts all URLs into HTML links

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published