2019-11-12 18:26:18 +08:00
|
|
|
<%= bootstrap_form_for @my_module, url: update_description_my_module_path(@my_module, format: :json), remote: :true, html: {class: 'tiny-mce-editor'} do |f| %>
|
2019-03-14 23:08:52 +08:00
|
|
|
<%= render partial: 'shared/tiny_mce_extra_buttons.html.erb' %>
|
2020-03-19 22:45:14 +08:00
|
|
|
<div id="my_module_description_view"
|
|
|
|
class="ql-editor tinymce-view"
|
2020-03-30 18:51:35 +08:00
|
|
|
data-placeholder="<%= t('my_modules.notes.empty_description_edit_label') %>"
|
2020-03-30 19:22:34 +08:00
|
|
|
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>
|
2019-03-14 23:08:52 +08:00
|
|
|
<%= f.tiny_mce_editor(:description,
|
|
|
|
id: :my_module_description_textarea,
|
2019-03-20 06:32:24 +08:00
|
|
|
class: 'hidden',
|
2020-03-30 18:51:35 +08:00
|
|
|
placeholder: t('my_modules.notes.empty_description_edit_label'),
|
2019-03-14 23:08:52 +08:00
|
|
|
hide_label: true,
|
2019-03-22 17:52:26 +08:00
|
|
|
value: sanitize_input(@my_module.tinymce_render(:description)),
|
2019-11-12 21:37:23 +08:00
|
|
|
autocomplete: 'off',
|
2019-03-14 23:08:52 +08:00
|
|
|
data: {
|
2020-03-19 22:45:14 +08:00
|
|
|
tinymce_object: "tinymce-my-module-description-#{@my_module.id}",
|
2019-03-14 23:08:52 +08:00
|
|
|
object_type: 'my_module',
|
|
|
|
object_id: @my_module.id,
|
2019-09-24 17:26:36 +08:00
|
|
|
last_updated: @my_module.updated_at.to_i * 1000 } ) %>
|
2019-03-14 23:08:52 +08:00
|
|
|
<% end %>
|