mod/tinymce_editor/set/all/reference_editor/reference_editor.haml
%div._nest-editor
.card-header.d-flex
%h5.mt-1
= title
.ms-auto
= link_to icon_tag(:close), path: "#", "data-bs-dismiss": editor_mode, class: "text-dark p-1 ms-1"
.card-body
.form
= haml_partial "#{editor}_editor", snippet: snippet
.card-footer.p-0
.preview.mx-1.my-1.form-control-feedback
Syntax preview
= text_field_tag "preview", snippet.raw, class: "_#{ref_type}-preview w-100 text-muted", readonly: true
%hr.mt-1.mb-1
.form-group-inline.d-flex.justify-content-center.py-3
= button_tag (modal_tm_snippet_editor? ? "Apply and Close" : "Apply"), apply_opts.merge(class: "_#{ref_type}-apply btn-sm me-3")
%a.border-light.text-dark.btn.btn-sm.btn-secondary{"data-bs-dismiss": editor_mode, href: "#"}
= modal_tm_snippet_editor? ? "Cancel" : "Close"