Updating Redactor Configs for Redactor II

This article pertains only to Craft 2.

Craft 2.5 includes “Redactor II”, a major update to the Redactor rich text editor that’s powering Rich Text fields.

The update introduced breaking changes, so Craft sites with Rich Text fields will need to make the following changes to their Redactor configs, located in craft/config/redactor:

Editing HTML Code

If your Redactor config included an "html" value in the "buttons" array, you can remove that, and add a "source" value to the "plugins" array instead.

// Old:
"buttons": [ "html" /* , ... */ ],

// New:
"plugins": [ "source" /* , ... */ ]

Paragraph Formatting

If your Redactor config included a "formatting" value in the "buttons" array, you need to rename that to "format".

// Old:
"buttons": [ "formatting" /* , ... */ ]

// New:
"buttons": [ "format" /* , ... */ ]

Lists

If your Redactor config included "unorderedlist", "orderedlist", "undent" or "indent" values in the "buttons" array, those can all be replaced with a single "lists" value.

// Old:
"buttons": [ "unorderedlist", "orderedlist", "undent", "indent" /* , ... */ ]

// New:
"buttons": [ "lists" /* , ... */ ]

Linking to Assets

If you want to allow editors to create hyperlinks to assets, add a "file" value to your "buttons" array, as “Link to an asset” is no longer an option in the “Link” button menu.

// Old:
"buttons": [ "link" /* , ... */ ]

// New:
"buttons": [ "link", "file" /* , ... */ ]