.form-group = label_tag "#{base}_#{attribute}", post_label_t(attribute, post: post) = render 'posts/attribute_feedback', post: post, attribute: attribute, metadata: metadata .editor{ id: attribute } -# Esto es para luego decirle al navegador que se olvide estas cosas. = hidden_field_tag 'storage_keys[]', "#{request.original_url}##{attribute}", data: { target: 'storage-key' } .alert.alert-info :markdown #{t('editor.alert')} = text_area_tag "#{base}[#{attribute}]", '', dir: dir, lang: locale, **field_options(attribute, metadata), class: 'd-none' .editor-toolbar .editor-primary-toolbar.scrollbar-black %button.btn{ data: { button: 'bold' } }= t('editor.bold') %button.btn{ data: { button: 'italic' } }= t('editor.italic') %button.btn{ data: { button: 'deleted' } }= t('editor.deleted') %button.btn{ data: { button: 'underline' } }= t('editor.underline') %button.btn{ data: { button: 'sup' } }= t('editor.sup') %button.btn{ data: { button: 'sub' } }= t('editor.sub') %button.btn{ data: { button: 'mark' } }= t('editor.mark') %button.btn{ data: { button: 'a' } }= t('editor.a') %button.btn{ data: { button: 'h1' } }= t('editor.h1') %button.btn{ data: { button: 'h2' } }= t('editor.h2') %button.btn{ data: { button: 'h3' } }= t('editor.h3') %button.btn{ data: { button: 'h4' } }= t('editor.h4') %button.btn{ data: { button: 'h5' } }= t('editor.h5') %button.btn{ data: { button: 'h6' } }= t('editor.h6') %button.btn{ data: { button: 'ul' } }= t('editor.ul') %button.btn{ data: { button: 'ol' } }= t('editor.ol') %button.btn{ data: { button: 'left' } }= t('editor.left') %button.btn{ data: { button: 'center' } }= t('editor.center') %button.btn{ data: { button: 'right' } }= t('editor.right') %button.btn{ data: { button: 'multimedia' } }= t('editor.multimedia') -# HAML cringe TODO: generar IDs para labels .editor-auxiliary-toolbar.mt-1.scrollbar-black{ data: { editor: { auxiliary: { toolbar: '' } } } } .form-group{ data: { editor: { auxiliary: 'mark' } } } %label{ for: 'mark-color' }= t('editor.color') %input.form-control{ type: 'color', data: { prop: 'mark-color' } }/ %div{ data: { editor: { auxiliary: 'multimedia' } } } .row .col-12.col-lg.form-group.d-flex.align-items-end .custom-file %input.custom-file-input{ type: 'file', data: { prop: 'multimedia-file' }, }/ %label.custom-file-label{ for: 'multimedia-file' }= t('editor.file.multimedia') %button.btn{ type: 'button', data: { prop: 'multimedia-file-upload' }, }= t('editor.file.multimedia-upload') .col-12.col-lg.form-group %label{ for: 'multimedia-alt' }= t('editor.description') %input.form-control{ type: 'text', data: { prop: 'multimedia-alt' } }/ .form-group{ data: { editor: { auxiliary: 'a' } } } %label{ for: 'a-href' }= t('editor.url') %input.form-control{ type: 'url', data: { prop: 'a-href' } }/ .editor-aviso-word.alert.alert-info %p= t('editor.word') .editor-content.form-control.h-auto.mt-1{ contenteditable: 'true' } = metadata.value.html_safe