feat: Adds support for superscript in help center articles (#7279)
- Adds support for superscript when rendering article markdown - Chatwoot Markdown Render to render markdown everywhere Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
committed by
GitHub
parent
2e79a32db7
commit
d2aa19579e
@@ -43,8 +43,6 @@ class Public::Api::V1::Portals::ArticlesController < Public::Api::V1::Portals::B
|
||||
end
|
||||
|
||||
def render_article_content(content)
|
||||
# rubocop:disable Rails/OutputSafety
|
||||
CommonMarker.render_html(content).html_safe
|
||||
# rubocop:enable Rails/OutputSafety
|
||||
ChatwootMarkdownRenderer.new(content).render_article
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,8 +7,6 @@ module MessageFormatHelper
|
||||
end
|
||||
|
||||
def render_message_content(message_content)
|
||||
# rubocop:disable Rails/OutputSafety
|
||||
CommonMarker.render_html(message_content).html_safe
|
||||
# rubocop:enable Rails/OutputSafety
|
||||
ChatwootMarkdownRenderer.new(message_content).render_message
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<tr>
|
||||
<td style="padding-bottom: 16px;">
|
||||
<% if message.content %>
|
||||
<%= CommonMarker.render_html(message.content).html_safe %>
|
||||
<%= ChatwootMarkdownRenderer.new(message_content).render_message %>
|
||||
<% end %>
|
||||
<% if message.attachments %>
|
||||
<% message.attachments.each do |attachment| %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% if @message.content %>
|
||||
<%= CommonMarker.render_html(@message.content).html_safe %>
|
||||
<%= ChatwootMarkdownRenderer.new(@message.content).render_message %>
|
||||
<% end %>
|
||||
<% if @message.attachments %>
|
||||
<% @message.attachments.each do |attachment| %>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<% if (message.content_type == 'input_csat' && message.message_type == 'template') %>
|
||||
<p>Click <a href="<%= message.conversation.csat_survey_link %>" _target="blank">here</a> to rate the conversation.</p>
|
||||
<% elsif message.content.present? %>
|
||||
<%= CommonMarker.render_html(message.content).html_safe %>
|
||||
<%= ChatwootMarkdownRenderer.new(message.content).render_message %>
|
||||
<% end %>
|
||||
<% if message.attachments.count.positive? %>
|
||||
<p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% @messages.each do |message| %>
|
||||
<p style="font-family: Roboto,"Helvetica Neue",Tahoma,Arial,sans-serif; text-align: start; unicode-bidi: plaintext;">
|
||||
<% if message.content %>
|
||||
<%= CommonMarker.render_html(message.content).html_safe %>
|
||||
<%= ChatwootMarkdownRenderer.new(message.content).render_message %>
|
||||
<% end %>
|
||||
<% if message.attachments %>
|
||||
<% message.attachments.each do |attachment| %>
|
||||
|
||||
Reference in New Issue
Block a user