Left, Center, Right -- Can the text alignment button be added to Redactor 2, and if so, how?

3 Answers 3


You can use the formattingAdd config setting to add custom formatting to the "Format" dropdown.

formattingAdd: {
  "align-left": {
    "title": "Align left",
    "args": ["p","class","align-left"],
  "align-right": {
    "title": "Align right",
    "args": ["p","class","align-right"],
  "align-center": {
    "title": "Align center",
    "args": ["p","class","align-center"],
  "align-justify": {
    "title": "Justify",
    "args": ["p","class","align-justify"],

If you want to have a separate dropdown or individual buttons in the toolbar for this functionality, have a look at my plugin Redactor Inline Styles.

  • carlcs - After a comparison, I would recommend your RedactorInlineStyles plugin to anyone wanting to return Redactor within Craft to its former glory. The documentation and examples you include with the plugin are great and really made it easy to configure. Commented Jan 21, 2016 at 15:58

Either existing answer could work.

Another option is a plugin I've recently built. Redactor Extras: https://github.com/elliotlewis/Redactor-Extras

Uses the Plugin from Redactors site for align. Has other extras as well.

  • great plugin. quick and easy to install and get stuff happening. thanks! Commented May 10, 2017 at 1:10

Thank you.

I also discovered this plugin which allows the addition of styles to the redactor editor.



enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.