From ffc39f078d8abc34b0c8ca9cc0fe598725a23ce9 Mon Sep 17 00:00:00 2001 From: lexx Date: Sun, 25 Aug 2024 14:45:49 +0300 Subject: [PATCH] trix --- front/js/svelte/libs/Trix.svelte | 11 +++++---- .../svelte/records/elements/RichEditor.svelte | 3 +-- front/package.json | 23 ------------------- front/sass/_dropdown.scss | 2 +- front/sass/_rich.scss | 20 +++++++++++++--- 5 files changed, 25 insertions(+), 34 deletions(-) diff --git a/front/js/svelte/libs/Trix.svelte b/front/js/svelte/libs/Trix.svelte index 0d65b20..a9186a6 100644 --- a/front/js/svelte/libs/Trix.svelte +++ b/front/js/svelte/libs/Trix.svelte @@ -4,6 +4,7 @@ import "trix/dist/trix.css" export let value = ""; + export let field; let editor; @@ -28,9 +29,9 @@ e.preventDefault(); }) }) - onDestroy(() => { - editor.removeEventListener("trix-before-initialize") - }) + // onDestroy(() => { + // editor.removeEventListener("trix-before-initialize") + // }) Trix.config.blockAttributes.default.breakOnReturn = false @@ -39,11 +40,11 @@
- + - + - {#if field.collections.length > 0} div { margin-bottom: 14px; font-size: 16px; line-height: 23px; } + &:focus { + background: var(--p10)!important; + + } + figure.attachment{ + display: flex!important; + flex-direction: column!important; + justify-content: center; + align-items: center; + gap: 10px; + } .attachment { - background: var(--p10); - padding: 0px; + background: var(--p20); + padding: 12px 0; text-align: center; display: flex; justify-content: center;