I see this question was asked a few years ago and just wondering if there's any answers to it now.

When entering text into various blocks in Mosaico, if we align the text to justify it appears to work on screen and in the html test preview but when it arrives in the inbox it has all changed back to left align.

Anyone else had this problem or got any ideas/workarounds?


2 Answers 2


[UPDATE: This problem is fixed now. Upgrade to the latest version of the Mosaico extension.]

This issue is tracked on Github. In short:

  • This is a bug in Mosaico itself, which has been fixed - but CiviCRM isn't using the latest version of Mosaico. Crowdfunding for an update is happening.

  • If you know what you're doing, you can manually patch Mosaico. I've done so for versions 2.5 and 2.6, but not 2.7. I tried making a patch you could apply but unfortunately it doesn't seem to patch cleanly. I might make a zip file of the patched Mosaico 2.6 for folks to download.


This issue happened with us also. After an investigation it turned out that the alignment on the 'p' html tag is not working well. But if you update the 'p' to 'div' manually with the source code editor in mosaico, the alignment works well again. This workaround needs a lot of manual work, in addition it is easy to make mistakes.

The mosaico extension provides an option for changing the behavior of the editor. If you set the $config['tinymceConfig']['forced_root_block'] = 'div'; setting, the editor will start creating the new paragraphs as div by default. It was nice, but we faced another issue. In the mosaico templates the paragraphs are defined with 'p' tags. If your cursor is in a 'p' paragraph, and you press enter it defines a new paragraph, but the tag is inherited from the previous paragraph, so that it is 'p'. So the final solution was a new mosaico base template where we replaced the 'p' tags to 'div'.

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.