2019-03-20 18:41:36 +08:00
|
|
|
<%= bootstrap_form_for @my_module, url: update_description_my_module_path(@my_module, format: :json), remote: :true do |f| %>
|
2019-03-14 23:08:52 +08:00
|
|
|
<%= render partial: 'shared/tiny_mce_extra_buttons.html.erb' %>
|
2019-03-20 06:32:24 +08:00
|
|
|
<% if @my_module.description.present? %>
|
|
|
|
<div id="my_module_description_view"
|
|
|
|
class="ql-editor tinymce-view"
|
|
|
|
data-placeholder="<%= t('my_modules.module_header.empty_description_edit_label') %>">
|
2019-03-22 17:52:26 +08:00
|
|
|
<%= custom_auto_link(@my_module.tinymce_render(:description),
|
2019-03-20 06:32:24 +08:00
|
|
|
simple_format: false,
|
|
|
|
tags: %w(img),
|
|
|
|
team: current_team) %>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div id="my_module_description_view"
|
|
|
|
class="ql-editor tinymce-view"
|
|
|
|
data-placeholder="<%= t('my_modules.module_header.empty_description_edit_label') %>"></div>
|
|
|
|
<% end %>
|
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',
|
2019-05-21 21:53:47 +08:00
|
|
|
placeholder: t('my_modules.module_header.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-03-14 23:08:52 +08:00
|
|
|
data: {
|
|
|
|
object_type: 'my_module',
|
|
|
|
object_id: @my_module.id,
|
2019-04-24 18:35:01 +08:00
|
|
|
highlightjs_path: asset_path('highlightjs-github-theme.css') } ) %>
|
2019-03-14 23:08:52 +08:00
|
|
|
<% end %>
|