2017 © Pedro Peláez
 

craft-plugin redactor

Edit rich text content in Craft CMS using Redactor by Imperavi.

image

craftcms/redactor

Edit rich text content in Craft CMS using Redactor by Imperavi.

  • Saturday, July 28, 2018
  • by brandonkelly
  • Repository
  • 11 Watchers
  • 15 Stars
  • 35,902 Installations
  • JavaScript
  • 18 Dependents
  • 0 Suggesters
  • 11 Forks
  • 7 Open issues
  • 17 Versions
  • 73 % Grown

The README.md

Redactor icon, (*1)

Redactor

This plugin adds a “Redactor” field type to Craft CMS, which provides a rich text editor powered by Redactor by Imperavi., (*2)

Requirements

This plugin requires Craft CMS 4.0 or later., (*3)

Installation

You can install this plugin from the Plugin Store or with Composer., (*4)

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Redactor”. Then click on the “Install” button in its modal window., (*5)

With Composer

Open your terminal and run the following commands:, (*6)

# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require craftcms/redactor

# tell Craft to install the plugin
./craft install/plugin redactor

Configuration

Redactor Configs

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., (*7)

For example, if you created a config/redactor/Standard.json file with the following content:, (*8)

{
  "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., (*9)

See the Redactor documentation for a list of available config options and buttons., (*10)

Craft Redactor config options

Craft addes the enforceButtonOrder config option that can be set to a list of button names in the expected order. This option should be used to address the uncontrollable button order set by Redactor when adding plugins to the configuration., (*11)

HTML Purifier Configs

Redactor fields use HTML Purifier to ensure that no malicious code makes it into its field values, to prevent XSS attacks and other vulnerabilities., (*12)

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., (*13)

Copy Default.json as a starting point, which is the default config that Redactor fields use if no custom HTML Purifier config is selected., (*14)

See the HTML Purifier documentation for a list of available config options., (*15)

For advanced customization, you can modify the HTMLPurifier_Config object directly via the craft\redactor\Field::EVENT_MODIFY_PURIFIER_CONFIG event., (*16)

use craft\htmlfield\events\ModifyPurifierConfigEvent;
use craft\redactor\Field;
use HTMLPurifier_Config;
use yii\base\Event;

Event::on(
    Field::class,
    Field::EVENT_MODIFY_PURIFIER_CONFIG,
    function(ModifyPurifierConfigEvent $event) {
        /** @var HTMLPurifier_Config $config */
        $config = $event->config;
        // ...
    }
);

Redactor JS Plugins

All first party Redactor JS plugins are bundled by default. To enable them, just add the plugin handle to the plugin array in your Redactor config., (*17)

{
  "plugins": ["alignment", "fullscreen"]
}

You can also supply your own Redactor plugins by saving them in your config/redactor/ folder. You can either place the plugin directly in that folder, or within a subfolder that is named after the plugin:, (*18)

config/
└── redactor/
    └── plugins/
        ├── foo.js
        └── bar/
            └── bar.js

Other Craft plugins can supply additional Redactor JS plugin locations using the craft\redactor\Field::EVENT_REGISTER_PLUGIN_PATHS event., (*19)

The Versions

28/07 2018

v2.x-dev

2.9999999.9999999.9999999-dev

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

28/07 2018

2.1.4

2.1.4.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

25/07 2018

2.1.3

2.1.3.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

14/07 2018

2.1.2

2.1.2.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

13/07 2018

2.1.1

2.1.1.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

15/05 2018

2.1.0

2.1.0.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

07/05 2018

2.0.1

2.0.1.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

01/05 2018

2.0.0.1

2.0.0.1

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

01/05 2018

2.0.0

2.0.0.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

30/04 2018

v1.x-dev

1.9999999.9999999.9999999-dev

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

04/04 2018

1.1.0

1.1.0.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

17/02 2018

dev-master

9999999-dev

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

25/01 2018

1.0.1

1.0.1.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

15/01 2018

dev-develop

dev-develop

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

11/12 2017

1.0.0.1

1.0.0.1

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

04/12 2017

1.0.0

1.0.0.0

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor

22/11 2017

1.0.0-beta.1

1.0.0.0-beta1

Edit rich text content in Craft CMS using Redactor by Imperavi.

  Sources   Download

MIT

The Requires

 

yii2 html cms craftcms redactor