Redactor 1.2 now available

I'm glad to announce the immediate availability of Redactor 1.2! JP DeVries has been doing a fantastic job on pushing Redactor to the next level with many improvements and new features you have been asking for.

More details below, but Redactor 1.2 indeed has custom formats, lets you load custom plugins and works with MIGX.

New: Custom Styles

assets/uploads/redactor_custom_styles.pngThis has to be the number one requested feature. Or maybe that was MIGX support, but at any rate a lot of people have been asking for this. Redactor 1.2 adds custom styles, which work quite similar to Custom Formats in TinyMCE.

The new Custom Styles option, which is documented here, lets you manage a new toolbar button with dropdown to apply specific styling or formatting to the text. There are pretty much endless possibilities with this new feature, as you can specify the tag that is used, add classes to the tag or inline styling, define if it needs to be applied on the block level, etc. On modmore.com we're using it to apply <code> tags to inline code blocks in our documentation and no doubt we'll add more as we go.

There are a lot of examples for custom styles available, but we'd love to hear from you if you have other great use cases or need help setting it up.

New: Clips

The newly incorporated Clips plugin lets you create a clipboard of "clips" or "snips" of text or code you want to insert. While Custom Styles are used to apply formatting to existing text, Clips are inserted as a whole.

As you can see in the Clips documentation there are a lot of possibilities, but my personal favourite usage is with currencies and other symbols. These can be tricky (especially for non-technical users) to insert, but with Clips it's as simple as clicking the toolbar button and finding the right one in the list.

New: MIGX Support

Finally. After some useful pointers from Bruno, we landed support for Redactor 1.2 in MIGX 2.5.6. It's important to have the latest version of both packages, but when you do you can finally use the Redactor editor within your MIGX TV. Simply specify "inputTVtype":"richtext" (no need for an inputTV) in your form tabs JSON, and it should automatically use Redactor when installed.

New: Easier component integration

If you want to use Redactor within your custom components for rich text editors, this is now a whole lot easier with 1.2. Redactor was refactored to make use of the OnRichTextEditorInit system event, and will now set up a MODx.loadRTE javascript function for you to call inside the component. Find the documentation here, and be sure to let us know if you integrated Redactor in your own work.

This feature was commissioned by the awesome folks at MODX, who had a client requesting to use Redactor in custom development they carried out. Thanks for helping us make Redactor better!

And more..

  • You can now easily load custom or existing Redactor plugins. Simply define the name and reference the file in the redactor.additionalPlugins setting in this format: fontfamily:/path/to/fontfamily.js,otherplugin:/path/to/otherplugin.js and they will be loaded and injected properly. (Requires 1.2.4 to function properly)
  • Updated to Redactor 9.0.4 which fixes a number of editor related bugs. Imperavi released Redactor 9.1 yesterday with some really cool improvements to image insertion (copy/paste, moving it around in the editor and more), which was a bit last minute to put in Redactor for MODX 1.2. We've already begun testing it and, as always, will be working on bringing it to you in a future version.
  • When using iframe mode, we now inject a <base href="http://yoursite.com"> tag. This means you can use the iframe mode as alternative compatibility mode when you have previously inserted images with TinyMCE (background).
  • The air mode toolbar now shows in fullscreen mode too.
  • On new installs (this does not affect upgrades), the Redactor media source will default to the value of the default_media_source setting, instead of being "hardcoded" to ID 1.
  • Small fix related to Redactor TVs when which_editor is not set to Redactor.
  • Added Open in New Tab option to resources.

There are a lot of fantastic improvements and new features in this release and I encourage you to go ahead and upgrade your sites. 1.2 has been available as pre-release for a few days, and thanks to some great bug reporters we've already made a number of improvements putting the current version at 1.2.4.

As always, be sure to let us know if you need any help or if you have great ideas on making Redactor even better. Simply shoot an email to [email protected] and we'll get back to you as soon as humanly possible.

That's it for today. Enjoy writing content!

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.