haiek / craft-text-encoder
Encode strings, email addresses or whatever you want...
Package info
github.com/HaiekTech/craft-text-encoder
Type:craft-plugin
pkg:composer/haiek/craft-text-encoder
v1.1
2018-12-13 14:40 UTC
Requires
- craftcms/cms: ^3.0.0-RC1
This package is auto-updated.
Last update: 2026-03-14 07:10:27 UTC
README
Encode strings, email addresses or whatever you want...
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project -
Then tell Composer to load the plugin:
composer require haiek/craft-text-encoder -
In the Control Panel, go to Settings → Plugins and click the “Install” button for Craft Text Encoder.
Usage
You can use the plugin either as a function or a filter:
{# encode all emails found inside string #} {{ findEncodeMail(block.richTextEditor)|raw }} {# encode a single email address #} {{ encodeMail('hello@haiek.tech')|raw }}
{# encode all emails found inside string #} {{ block.richTextEditor|findEncodeMail|raw }} {# encode a single email address #} {{ 'hello@haiek.tech'|encodeMail|raw }}