PHPackages                             craftcms/redactor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. craftcms/redactor

Abandoned → [craftcms/ckeditor](/?search=craftcms%2Fckeditor)Craft-plugin[Utility &amp; Helpers](/categories/utility)

craftcms/redactor
=================

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

4.2.0(1y ago)1002.7M↓45.5%47[59 issues](https://github.com/craftcms/redactor/issues)[3 PRs](https://github.com/craftcms/redactor/pulls)20MITJavaScriptPHP ^8.2CI passing

Since Nov 22Pushed 1y ago9 watchersCompare

[ Source](https://github.com/craftcms/redactor)[ Packagist](https://packagist.org/packages/craftcms/redactor)[ RSS](/packages/craftcms-redactor/feed)WikiDiscussions 3.x Synced 2d ago

READMEChangelog (4)Dependencies (5)Versions (79)Used By (20)

[![Redactor icon](./src/icon.svg)](./src/icon.svg)

Redactor
========

[](#redactor)

This plugin adds a “Redactor” field type to Craft CMS, which provides a rich text editor powered by [Redactor](https://imperavi.com/redactor/) by Imperavi.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 4.0 or later.

Installation
------------

[](#installation)

You can install this plugin from the Plugin Store or with Composer.

#### From the Plugin Store

[](#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.

#### With Composer

[](#with-composer)

Open your terminal and run the following commands:

```
# 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
-------------

[](#configuration)

### Redactor Configs

[](#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.

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](https://imperavi.com/redactor/docs/settings/) for a list of available config options and buttons.

### Craft Redactor config options

[](#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.

### HTML Purifier Configs

[](#html-purifier-configs)

Redactor fields use [HTML Purifier](http://htmlpurifier.org) to ensure that no malicious code makes it into its field values, to prevent XSS attacks and other vulnerabilities.

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.

Copy [Default.json](https://github.com/craftcms/craft/blob/main/config/htmlpurifier/Default.json) as a starting point, which is the default config that Redactor fields use if no custom HTML Purifier config is selected.

See the [HTML Purifier documentation](http://htmlpurifier.org/live/configdoc/plain.html) for a list of available config options.

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

```
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

[](#redactor-js-plugins)

All [first party Redactor JS plugins](https://imperavi.com/redactor/plugins/) are bundled by default. To enable them, just add the plugin handle to the `plugin` array in your Redactor config.

```
{
  "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:

```
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.

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance21

Infrequent updates — may be unmaintained

Popularity57

Moderate usage in the ecosystem

Community43

Growing community involvement

Maturity91

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 52.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Recently: every ~21 days

Total

73

Last Release

668d ago

Major Versions

2.10.10 → 3.0.22022-06-30

2.10.11 → 3.0.32023-01-01

2.10.12 → 3.0.42023-03-16

3.0.4 → 4.0.02024-03-21

3.x-dev → 4.1.02024-06-12

PHP version history (2 changes)3.0.0-beta.1PHP ^8.0.2

4.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ccdf8b493035de2343c55bd889513e3af5c04d5823482a2b186ad16adb1c3e3?d=identicon)[brandonkelly](/maintainers/brandonkelly)

---

Top Contributors

[![brandonkelly](https://avatars.githubusercontent.com/u/47792?v=4)](https://github.com/brandonkelly "brandonkelly (262 commits)")[![andris-sevcenko](https://avatars.githubusercontent.com/u/1891118?v=4)](https://github.com/andris-sevcenko "andris-sevcenko (146 commits)")[![angrybrad](https://avatars.githubusercontent.com/u/61869?v=4)](https://github.com/angrybrad "angrybrad (28 commits)")[![timkelty](https://avatars.githubusercontent.com/u/18329?v=4)](https://github.com/timkelty "timkelty (15 commits)")[![carlcs](https://avatars.githubusercontent.com/u/7516543?v=4)](https://github.com/carlcs "carlcs (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![benface](https://avatars.githubusercontent.com/u/1059139?v=4)](https://github.com/benface "benface (5 commits)")[![chris78er](https://avatars.githubusercontent.com/u/49327719?v=4)](https://github.com/chris78er "chris78er (4 commits)")[![olivierbon](https://avatars.githubusercontent.com/u/146041?v=4)](https://github.com/olivierbon "olivierbon (2 commits)")[![kennethormandy](https://avatars.githubusercontent.com/u/1581276?v=4)](https://github.com/kennethormandy "kennethormandy (1 commits)")[![kringkaste](https://avatars.githubusercontent.com/u/964698?v=4)](https://github.com/kringkaste "kringkaste (1 commits)")[![lindseydiloreto](https://avatars.githubusercontent.com/u/5309692?v=4)](https://github.com/lindseydiloreto "lindseydiloreto (1 commits)")[![nettum](https://avatars.githubusercontent.com/u/798156?v=4)](https://github.com/nettum "nettum (1 commits)")[![olemartinb](https://avatars.githubusercontent.com/u/66007166?v=4)](https://github.com/olemartinb "olemartinb (1 commits)")[![Saboteur777](https://avatars.githubusercontent.com/u/9061795?v=4)](https://github.com/Saboteur777 "Saboteur777 (1 commits)")[![steverowling](https://avatars.githubusercontent.com/u/4478560?v=4)](https://github.com/steverowling "steverowling (1 commits)")[![tpmatthes](https://avatars.githubusercontent.com/u/30212990?v=4)](https://github.com/tpmatthes "tpmatthes (1 commits)")[![XhmikosR](https://avatars.githubusercontent.com/u/349621?v=4)](https://github.com/XhmikosR "XhmikosR (1 commits)")[![arollmann](https://avatars.githubusercontent.com/u/2589161?v=4)](https://github.com/arollmann "arollmann (1 commits)")[![bencroker](https://avatars.githubusercontent.com/u/57572400?v=4)](https://github.com/bencroker "bencroker (1 commits)")

---

Tags

craft-plugincraftcmsredactorhtmlcmsyii2craftcmsRedactor

### Embed Badge

![Health badge](/badges/craftcms-redactor/health.svg)

```
[![Health](https://phpackages.com/badges/craftcms-redactor/health.svg)](https://phpackages.com/packages/craftcms-redactor)
```

###  Alternatives

[craftcms/ckeditor

Edit rich text content in Craft CMS using CKEditor.

47406.3k76](/packages/craftcms-ckeditor)[spicyweb/craft-neo

A Matrix-like field type with block hierarchy

393813.5k10](/packages/spicyweb-craft-neo)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k33](/packages/craftcms-feed-me)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[craftcms/webhooks

Post webhooks when events are triggered in Craft CMS.

84139.0k1](/packages/craftcms-webhooks)[verbb/comments

Add comments to your site.

13753.9k](/packages/verbb-comments)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
