5

When sending a CiviMail message, users sometimes want to customize the preview text for email clients - which is good practice. (The preview text shows up under the Subject in many email clients.) Using the default mosaico pre-header, you end up with preview text of "Unsubscribe View in your browser...." [update: HomoTechsual notes that the Mosaico pre-header has a preview text option. But this has limitations as noted in the thread.]

It seems there are two ways to edit the preview text in Civi:

  1. Creating a pre-header block with the text for the preview, but this will be visible in the text of the email, which often isn't ideal.
  2. Creating a <div style="display: none;">Preview text here</div> before any other text in the email. This is not user-friendly and is easily forgotten by users who have the knowledge of how to do it.

Any other suggestions for handling this?

Potential feature request: I'd love to see an non-required field for Preview Text under the subject field for every mailing. And (okay, this is a different, related feature) it would be great if a Preview Text field and Subject line could accommodate emojis (as described here). If Civi doesn't add these abilities, I'm concerned it will fall behind in user expectations compared to other mass mailers.

2

2 Answers 2

3

I recently wrote an extension to handle this: https://lab.civicrm.org/extensions/mailingpreviewtext

enter image description here

1
4

Mosaico 2.x on CiviCRM already has the feature to add "preview text" for emails.

Email preview text on CiviCRM Mosaico 2.0-beta4

This is handled in the default "versafix-1" template and any derivatives thereof by way of a hidden text field in the HTML.

Your supplemental question regarding Emoji is more difficult - the Mosaico library can handle Emoji however CiviCRM's database storage engine doesn't use UTF8MB4 and isn't setup to handle Emoji content at this time. There is an issue here however getting this change into CiviCRM core (which is where it would need to occur) is not simple nor a priority at this time.

7
  • The problem with this is that if users have a mosaico template that they want to reuse, they have to go into the Mosaico editor to make the change, rather than creating a mailing based on that Mosaico template. It's also only a solution if one uses a Mosaico template. Sending out a "normal" message or system workflow message, doesn't have this option easily accessible to the user. Nov 28, 2018 at 17:43
  • That’s a valid point but it belongs on the Mosaico issue queue as a feature request. The current implementation is basically what comes in Mosaico - so there is currently no CiviCRM changes to that ‘bit’. Nov 28, 2018 at 17:45
  • But I'm interested in seeing it implemented outside of Mosaico, as not every communication requires the extra steps of Mosaico. Of course, the Mosaico template builder would need to coordinate with the basic mail editor in this regard. Nov 28, 2018 at 17:50
  • The Mosaico editor has nothing to do with the basic mail editor it is a replacement for it. Nov 28, 2018 at 17:50
  • @PhilMoriceBrubaker for the more basic communication it’ll depend on how you’re sending it for how best to implement this but the place to start would be the feature requests area on GitLab Nov 28, 2018 at 17:52

Your Answer

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

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