Change the colour of the placeholder {{ticket.latest_public_comment_formatted}}


4 Commentaires

  • Jessie Schutz
    Zendesk Customer Care

    Hi Rosie!

    I just want to clarify what you're trying to do here. Are you trying to change the font color of the text generated by the placeholder? Or are you looking to change some other text?

  • Rosie

    Hi Jessie! As I have multiple brands, I want the email template to be in a different font - so I'm using triggers to send a different email template. At the moment the font is the same on all of them, so I want the placeholder/comment text to be in a different colour. 

  • Jessie Schutz
    Zendesk Customer Care

    Hey Rosie,

    If I understand what you're looking to do correctly, you want to change the font color of the text generated by a placeholder in the trigger itself.

    I did some testing on this and was able to successfully get it to work, with some caveats.

    Firstly, in order to do this, you need to use HTML to format the text. In my test I used <p style="color:red">{{placeholder goes here}}</p>.

    I test it on the formatted version of the placeholder you're using, and on the unformatted version. The code did not have any impact on the formatted version (which is what you cited in your original post). 

    However, it did work on the unformatted version of the placeholder. Here's a screenshot of what it looks like:

    The top version, with the picture, name, and date is the formatted placeholder that you're currently using. You can see that the font color was not changed.

    The bottom version, which just displays the text, was successfully formatted with the font color I wanted. However, because it's the unformatted version of the placeholder, the picture and other info isn't included.

    So, to summarize, yes, you can change the color of the text inserted by your placeholders, but you have to use the unformatted version of that placeholder which will eliminate some of the other elements you might still wish to include in your email.

    Please let me know if you have any other questions!

  • Duke Oliver

    Hi Rosie,

    Is it possible to get a screenshot of your email template? It may be related to an issue I recently had. Gmail was adding a css class called .im to most of our zendesk emails, which made the text purple. So in my email template, I targeted the css and told it to be black instead:

    What you could do is view the source of the email once it's sent, and do some poking around to find out what class you need to append your color to. If this is related to your question, I'd be happy to help out


Cette publication n’accepte pas de commentaire.

Réalisé par Zendesk