rename editor css class

Co-authored-by: Colin Darie <colin@darie.eu>
This commit is contained in:
Christophe Robillard 2024-03-11 16:20:00 +01:00 committed by simon lehericey
parent fd9335f129
commit 5aac2ecdc4
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
4 changed files with 19 additions and 16 deletions

View file

@ -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

View 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);
}
}

View file

@ -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)) }

View file

@ -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 })