Chatwoot/app/views/mailers/conversation_reply_mailer/reply_without_summary.html.erb
Sojan Jose 13073629bb
feat: Enable Markdown Parsing in emails (#1663)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-01-18 11:43:31 +05:30

14 lines
580 B
Text

<% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) %>
<% @messages.each do |message| %>
<p style="font-family: Roboto,"Helvetica Neue",Tahoma,Arial,sans-serif; text-align: start; unicode-bidi: plaintext;">
<% if message.content %>
<%= markdown.render(message.content).html_safe %>
<% end %>
<% if message.attachments %>
<% message.attachments.each do |attachment| %>
attachment [<a href="<%= attachment.file_url %>" _target="blank">click here to view</a>]
<% end %>
<% end %>
</p>
<% end %>