haiek / craft-text-encoder
Encode strings, email addresses or whatever you want...
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0-RC1
This package is auto-updated.
Last update: 2024-09-14 03:46:04 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 }}