Answers.Body: <p>[<strong>UPDATE</strong>: This problem is fixed now.  Upgrade to the latest version of the Mosaico extension.]</p>
  <p>This issue is tracked <a href="https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/237" rel="nofollow noreferrer">on Github</a>.  In short:</p>
  <ul>
  <li><p>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.</p>
  </li>
  <li><p>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 <a href="https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/237#issuecomment-760423831" rel="nofollow noreferrer">patch you could apply</a> 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.</p>
  </li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-11T16:21:33.200Z
Answers.LastActivityDate: 2024-01-19T16:55:39.713Z
Answers.LastEditDate: 2024-01-19T16:55:39.713Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>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.</p>
  <p>The mosaico extension provides an <a href="https://docs.civicrm.org/mosaico/en/latest/api/#hook_civicrm_mosaicoconfig" rel="nofollow noreferrer">option</a> for changing the behavior of the editor. If you set the <code>$config['tinymceConfig']['forced_root_block'] = 'div';</code> 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 <a href="https://docs.civicrm.org/mosaico/en/latest/api/#base-templates" rel="nofollow noreferrer">base template</a> where we replaced the 'p' tags to 'div'.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-11T11:49:36.357Z
Answers.LastActivityDate: 2021-07-11T11:49:36.357Z
Answers.UserDisplayName: akosgarai
Body: <p>I see this question was asked a few years ago and just wondering if there's any answers to it now.</p>
  <p>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.</p>
  <p>Anyone else had this problem or got any ideas/workarounds?</p>
  <p>Thanks.</p>
  
Tags: <mosaico>
Title: Mosaico text alignment
ThreadText: # Mosaico text alignment
  
  (Asked by: username_0 on 2021-05-28)
  
  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?
  
  Thanks.
  
  **Tags:** mosaico
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-07-11. Score: 4
  
  [**UPDATE**: This problem is fixed now. Upgrade to the latest version of the Mosaico extension.]
  
  This issue is tracked [on Github](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/237). 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](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/237#issuecomment-760423831) 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.
  
  
  ---
  
  ### Answer by username_2 on 2021-07-11. Score: 1
  
  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](https://docs.civicrm.org/mosaico/en/latest/api/#hook_civicrm_mosaicoconfig) 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](https://docs.civicrm.org/mosaico/en/latest/api/#base-templates) where we replaced the 'p' tags to 'div'.
  
  
  ---
  
  