From 10bd1d425d4d0595b7ac0890d5dcae46ef9e66fd Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 30 Mar 2020 13:22:34 +0200 Subject: [PATCH] Fix placeholder for tinymce description fields --- app/views/my_modules/_description_form.html.erb | 13 +++++-------- .../protocols/_protocol_description_form.html.erb | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/app/views/my_modules/_description_form.html.erb b/app/views/my_modules/_description_form.html.erb index 225cf1a79..358dde9e1 100644 --- a/app/views/my_modules/_description_form.html.erb +++ b/app/views/my_modules/_description_form.html.erb @@ -3,14 +3,11 @@
- <% if @my_module.description.present? %> - <%= custom_auto_link(@my_module.tinymce_render(:description), - simple_format: false, - tags: %w(img), - team: current_team) %> - <% end %> -
+ 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? %> <%= f.tiny_mce_editor(:description, id: :my_module_description_textarea, class: 'hidden', diff --git a/app/views/my_modules/protocols/_protocol_description_form.html.erb b/app/views/my_modules/protocols/_protocol_description_form.html.erb index 9fb6d8b64..af3d25fb4 100644 --- a/app/views/my_modules/protocols/_protocol_description_form.html.erb +++ b/app/views/my_modules/protocols/_protocol_description_form.html.erb @@ -3,14 +3,11 @@
- <% if protocol.description.present? %> - <%= custom_auto_link(protocol.tinymce_render(:description), - simple_format: false, - tags: %w(img), - team: current_team) %> - <% end %> -
+ 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? %> <%= f.tiny_mce_editor(:description, id: :protocol_description_textarea, class: 'hidden',