Announcing Redactor 2.0

The first major version of Redactor was released back in June 2013, when we introduced modmore to the world. Since then your heartfelt reviews and purchases of our premium extras have enabled us to build more extras and even host an event. We have no plans of slowing down. With that said, it gives me great pleasure to share with you a new major version of awesome: Redactor 2.0.

TL;DR

Here's what you need to know:

  • Redactor for MODX 2.0 is now up to speed with Redactor.js 10
  • The new media browser is more scalable and has new features for power users
  • Source mode can now use CodeMirror or Ace for syntax highlighting
  • All 150 or so settings are now context aware
  • There are 22 plugins for Redactor available, 13 of which are brand new and based on your feature requests
  • And best of all, Redactor 2 is a free upgrade!

If you're eager to try it out, any sites with valid Redactor licenses should now see the 2.0.0 update. We first recommend reading the upgrade notes which includes information about changed or depreciated features.

For more details, keep reading, or check out the changelog and documentation.

Redactor 2.0

On September 24, 2014 Imperavi, the authors of Redactor.js, released Redactor 10.0 and we immediately began work on Redactor 2.0. After months of hard work, we're finally ready to announce our second major version of Redactor for MODX. I’m very excited to share this release with you and can’t wait to hear what you have to say.

Let’s have a look at the highlights.

Syntax highlighting

Redactor 2.0 now supports CodeMirror or Ace for syntax highlighting. If the associated packages are installed, Redactor will use your existing settings. Or, since source mode might not be required for some users, you can prevent them viewing the source altogether.

Users can choose their own syntax themes and font sizes with Redactor for MODX 2.0
Users can choose their own syntax themes and font sizes


Settings like theme and fontSize can be configured on the user level so it’s easy to increase the font size or use a high contrast theme for particular users.

New media browser

Redactor 1.x used a simple media browser that didn't scale very well. We've created an all new media browser with improved performance and user experience. This is a new open-source component called Eureka.

We've kept the simple upload window that allows one or more files to be uploaded to a predefined location. Some of our power users want more control over where that file or image they are uploading is going, so we created a setting for that. By enabling the redactor.eurekaUpload system setting, you'll find the ability to upload to any directory within available media sources, and even create new directories, in the enhanced browse & upload tab.

Eureka.js as seen in Redactor 2.0 for MODX
Eureka.js as seen in Redactor 2.0 for MODX

Context aware settings

With Redactor 2.0, all our 150 or so settings are now context aware, meaning that they can be overridden on a context level. It’s now trivial to do things like upload images to different locations based on the current context, or to enable/disable specific plugins for specific contexts.

A baker’s dozen new plugins

When upgrading to Redactor 2.0, you’ll have several new plugins at your disposal. It now ships with a total of 22 plugins that can be enabled or disabling with a simple yes/no setting.

13 of these plugins are brand new and authored by yours truly. Many of them contain new features that have been requested through support, so we can’t wait to hear what you have to say. Let's have a look at what these new plugins can do.

  • Breadcrumbs - displays a breadcrumb navigation of the DOM node or nodes being edited
  • Contrast - press F5 to invert the editor colors
  • Counter - adds a character counter to the bottom right of the editor
  • Download - adds a toolbar button to download editor code
  • Eureka - use the Eureka media browser to choose images
  • ImagePX - adds options to set and preview image dimensions in the image edit modal window
  • Limiter - limit the number of characters a user can enter
  • Norphan - attempts to prevent orphans by replacing the last space between words of block elements with a non-breaking space
  • Replace - use CTRL+F to trigger a simple Find and Replace tool
  • Speek - adds a toolbar button which reads editor content aloud
  • Syntax - adds Ace syntax highlighter to Redactor source mode (enable the redactor.codemirror setting for CodeMirror)
  • Text Expander - Enter a short snippet of text or a word and this plugin will replace it to a frequently used predefined text
  • UploadCare - adds Uploadcare to the toolbar

To use these, you'll need to first enable them in system settings.

And more awesome new features 

Had enough yet? We haven't, as there are even more new features in Redactor 2.0 that we'd love you to try.

  • Upload and browse settings can now contain all resource properties as placeholder, including Template Variables
  • The Clips plugin can now be organized better with tags
  • With Advanced Attributes enabled, the email link tab will also provide subject, CC, and BCC fields to add to the mailto link
  • Redactor can now be used on the introtext field

Open source FTW

With the Redactor v10 core more extensible than ever, we were able to abstract the majority of our modifications to standalone plugins. Aside from making it easier for us to stay up to date with Imperavi's releases, this means we can also share our work with others using Redactor. We've open-sourced these plugins on Github for others to use on Redactor projects and hope you will find it useful. The new media browser used in Redactor 2.0 is on Github as well. These plugins are free to use and we hope Redactor users in or outside the MODX community will find them useful. Who knows, checking out how we authored our plugins may even give you inspiration to author one of your own or to improve ours!

Free upgrade

We've put a lot of effort into making Redactor 2.0 the best rich text editor possible. Despite that, Redactor 2.0 will be a free upgrade for all users. Aside from all the new features, Redactor 2 also fixes a lot of bugs and we wanted everyone to benefit from that.

All your sites with valid Redactor licenses should now see 2.0.0 as an update (let us know if they don't). We've prepared an upgrading from 1.x to 2.0 doc containing information about changed or deprecated features from 1.x and how to deal with those, so we recommend checking that out before upgrading your live sites.

We hope you like the update!

Mark Hamstra

Mark is the CEA at modmore where he helps people doing more with MODX. He accomplishes this by providing premium extras with great support and documentation, and other initiatives meant to help MODXers around, like MODX.today.