add to fields with rich text formatting

This commit is contained in:
Mojca Lorber 2017-01-19 15:27:24 +01:00
parent 44de927cf4
commit 4ea154410a
3 changed files with 7 additions and 4 deletions

View file

@ -23,8 +23,9 @@
<div class="report-element-body"> <div class="report-element-body">
<div class="row"> <div class="row">
<div class="col-xs-12 text-container ql-editor"> <div class="col-xs-12 text-container ql-editor">
<%= auto_link(result_text.text, <%= auto_link(smart_annotation_parser(result_text.text),
link: :urls, link: :urls,
sanitize: false,
html: { target: '_blank' }).html_safe %> html: { target: '_blank' }).html_safe %>
</div> </div>
</div> </div>

View file

@ -27,9 +27,10 @@
<div class="row"> <div class="row">
<div class="col-xs-12 ql-editor"> <div class="col-xs-12 ql-editor">
<% if strip_tags(step.description).present? %> <% if strip_tags(step.description).present? %>
<%= auto_link(step.description, <%= auto_link(smart_annotation_parser(step.description),
link: :urls, link: :urls,
html: { target: '_blank' }).html_safe %> sanitize: false,
html: { target: '_blank' }).html_safe %>
<% else %> <% else %>
<em><%=t "projects.reports.elements.step.no_description" %></em> <em><%=t "projects.reports.elements.step.no_description" %></em>
<% end %> <% end %>

View file

@ -1,5 +1,6 @@
<div class="ql-editor"> <div class="ql-editor">
<%= auto_link(smart_annotation_parser(result.result_text.text), <%= auto_link(smart_annotation_parser(result.result_text.text),
link: :urls, link: :urls,
sanitize: false,
html: { target: '_blank' }).html_safe %> html: { target: '_blank' }).html_safe %>
</div> </div>