This plugin adds a “Redactor” field type to Craft CMS, which provides a rich text editor powered by Redactor by Imperavi.
This plugin requires Craft CMS 3.0.0-RC15 or later.
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 craftcms/redactor
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Redactor.
You can create custom Redactor configs that will be available to your Redactor fields. They should be created as JSON files in your config/redactor/
folder.
For example, if you created a config/redactor/Standard.json
file with the following content:
{
"buttons": ["html", "format", "bold", "italic", "lists", "link", "file"],
"plugins": ["fullscreen"]
}
…then a “Standard” option would become available within the “Redactor Config” setting on your Redactor field’s settings.
See the Redactor documentation for a list of available config options and buttons.
You can create custom HTML Purifier configs that will be available to your Redactor fields. They should be created as JSON files in your config/htmlpurifier/
folder.
See the HTML Purifier documentation for a list of available config options.
All 1st party Redactor JS plugins are bundled by default. To enable them, just add the plugin handle to the plugin
array in your Redactor config.