From 8411b75def366a35289338713bf3d2a6a3a0c359 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Fri, 18 Oct 2024 10:52:38 +0200 Subject: [PATCH] Editable content always takes full width #10785 --- .../src/lib/editor/editor.component.scss | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/projects/natural-editor/src/lib/editor/editor.component.scss b/projects/natural-editor/src/lib/editor/editor.component.scss index 0f8b597c..ae5912c0 100644 --- a/projects/natural-editor/src/lib/editor/editor.component.scss +++ b/projects/natural-editor/src/lib/editor/editor.component.scss @@ -13,10 +13,16 @@ ::ng-deep { .ProseMirror { + --padding-right: 8px; + --padding-left: 14px; position: relative; - } + outline: none; + padding: 4px var(--padding-right) 4px var(--padding-left); + width: calc( + 100% - var(--padding-right) - var(--padding-left) + ); // Without this, OKpilot empty document will shrink to 0px, making it hard to focus to type something + line-height: 1.2; - .ProseMirror { word-wrap: break-word; -webkit-font-variant-ligatures: none; font-variant-ligatures: none; @@ -131,12 +137,6 @@ margin-top: 10px; } - .ProseMirror { - outline: none; - padding: 4px 8px 4px 14px; - line-height: 1.2; - } - .ProseMirror p { margin-bottom: 1em; }