Fix placeholder for tinymce description fields

This commit is contained in:
aignatov-bio 2020-03-30 13:22:34 +02:00
parent 92279d07ad
commit 10bd1d425d
2 changed files with 10 additions and 16 deletions

View file

@ -3,14 +3,11 @@
<div id="my_module_description_view"
class="ql-editor tinymce-view"
data-placeholder="<%= t('my_modules.module_header.empty_description_edit_label') %>"
data-tinymce-init="tinymce-my-module-description-<%= @my_module.id %>">
<% if @my_module.description.present? %>
<%= custom_auto_link(@my_module.tinymce_render(:description),
simple_format: false,
tags: %w(img),
team: current_team) %>
<% end %>
</div>
data-tinymce-init="tinymce-my-module-description-<%= @my_module.id %>"
><%= custom_auto_link(@my_module.tinymce_render(:description),
simple_format: false,
tags: %w(img),
team: current_team) if @my_module.description.present? %></div>
<%= f.tiny_mce_editor(:description,
id: :my_module_description_textarea,
class: 'hidden',

View file

@ -3,14 +3,11 @@
<div id="protocol_description_view"
class="ql-editor tinymce-view"
data-placeholder="<%= t('my_modules.protocols.protocol_status_bar.empty_description_edit_label') %>"
data-tinymce-init="tinymce-protocol-description-<%= protocol.id %>" >
<% if protocol.description.present? %>
<%= custom_auto_link(protocol.tinymce_render(:description),
simple_format: false,
tags: %w(img),
team: current_team) %>
<% end %>
</div>
data-tinymce-init="tinymce-protocol-description-<%= protocol.id %>"
><%= custom_auto_link(protocol.tinymce_render(:description),
simple_format: false,
tags: %w(img),
team: current_team) if protocol.description.present? %></div>
<%= f.tiny_mce_editor(:description,
id: :protocol_description_textarea,
class: 'hidden',