rename editor css class
Co-authored-by: Colin Darie <colin@darie.eu>
This commit is contained in:
parent
fd9335f129
commit
5aac2ecdc4
4 changed files with 19 additions and 16 deletions
|
@ -20,7 +20,7 @@
|
|||
min-height: 400px;
|
||||
}
|
||||
|
||||
.editor {
|
||||
.tiptap-editor {
|
||||
// Visual zones
|
||||
.header .flex-1,
|
||||
h1 {
|
||||
|
@ -63,17 +63,6 @@
|
|||
li p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// Tags
|
||||
.fr-menu__list {
|
||||
max-height: 500px;
|
||||
}
|
||||
|
||||
.fr-tag:not(.fr-menu .fr-tag) {
|
||||
// style span rendered by tiptap like a button/link tag
|
||||
color: var(--text-action-high-blue-france);
|
||||
background-color: var(--background-action-low-blue-france);
|
||||
}
|
||||
}
|
||||
|
||||
// scss-lint:disable SelectorFormat
|
||||
|
|
14
app/assets/stylesheets/tiptap_editor.scss
Normal file
14
app/assets/stylesheets/tiptap_editor.scss
Normal file
|
@ -0,0 +1,14 @@
|
|||
@import "constants";
|
||||
|
||||
.tiptap-editor {
|
||||
// Tags
|
||||
.fr-menu__list {
|
||||
max-height: 500px;
|
||||
}
|
||||
|
||||
.fr-tag:not(.fr-menu .fr-tag) {
|
||||
// style span rendered by tiptap like a button/link tag
|
||||
color: var(--text-action-high-blue-france);
|
||||
background-color: var(--background-action-low-blue-france);
|
||||
}
|
||||
}
|
|
@ -77,7 +77,7 @@
|
|||
%button.fr-btn.fr-btn--secondary.fr-btn--sm{ type: 'button', title: label, class: icon == :hidden ? "hidden" : "fr-icon-#{icon}", data: { action: 'click->tiptap#menuButton', tiptap_target: 'button', tiptap_action: action } }
|
||||
= label
|
||||
|
||||
#editor.editor{ data: { tiptap_target: 'editor' }, aria: { describedby: dom_id(f.object, "json-body-messages")} }
|
||||
#editor.tiptap-editor{ data: { tiptap_target: 'editor' }, aria: { describedby: dom_id(f.object, "json-body-messages")} }
|
||||
= f.hidden_field :tiptap_body, data: { tiptap_target: 'input' }
|
||||
|
||||
.fr-error-text{ id: dom_id(f.object, "json-body-messages"), class: class_names("hidden" => !f.object.errors.include?(:json_body)) }
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
|
||||
.fr-input-group{ data: { controller: 'tiptap' } }
|
||||
= f.label :tiptap_default_dossier_directory, class: "fr-label"
|
||||
.editor.mt-2{ data: { tiptap_target: 'editor' } }
|
||||
.tiptap-editor.fr-mt-1w{ data: { tiptap_target: 'editor' } }
|
||||
= f.hidden_field :tiptap_default_dossier_directory, data: { tiptap_target: 'input', controller: 'turbo-input', turbo_input_url_value: preview_instructeur_export_templates_path }
|
||||
.fr-mt-2w= render TagsButtonListComponent.new(tags: { nil => @export_template.specific_tags })
|
||||
|
||||
.fr-input-group{ data: { controller: 'tiptap' } }
|
||||
= f.label :tiptap_pdf_name, class: "fr-label"
|
||||
.editor.mt-2{ data: { tiptap_target: 'editor' } }
|
||||
.tiptap-editor.fr-mt-1w{ data: { tiptap_target: 'editor' } }
|
||||
= f.hidden_field :tiptap_pdf_name, data: { tiptap_target: 'input', controller: 'turbo-input', turbo_input_url_value: preview_instructeur_export_templates_path }
|
||||
.fr-mt-2w= render TagsButtonListComponent.new(tags: { nil => @export_template.specific_tags })
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
- @all_pj.each do |pj|
|
||||
.fr-input-group{ data: { controller: 'tiptap' } }
|
||||
= label_tag pj.libelle, nil, name: field_name(:export_template, "tiptap_pj_#{pj.stable_id}"), class: "fr-label"
|
||||
.editor.mt-2{ data: { tiptap_target: 'editor' } }
|
||||
.tiptap-editor.fr-mt-1w{ data: { tiptap_target: 'editor' } }
|
||||
= hidden_field_tag field_name(:export_template, "tiptap_pj_#{pj.stable_id}"), "#{@export_template.content_for_pj(pj)}" , data: { tiptap_target: 'input', controller: 'turbo-input', turbo_input_url_value: preview_instructeur_export_templates_path }
|
||||
.fr-mt-2w= render TagsButtonListComponent.new(tags: { nil => @export_template.specific_tags })
|
||||
|
||||
|
|
Loading…
Reference in a new issue