From be7905cebf5d9c2b7e9a059f2046566afa991e0e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 25 Nov 2021 16:32:10 +0100 Subject: [PATCH] Update tiptap styles Signed-off-by: Thomas Citharel --- js/src/components/Editor/style.scss | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/js/src/components/Editor/style.scss b/js/src/components/Editor/style.scss index cced5a400..f7e820244 100644 --- a/js/src/components/Editor/style.scss +++ b/js/src/components/Editor/style.scss @@ -5,10 +5,14 @@ .ProseMirror { position: relative; +} +.ProseMirror { word-wrap: break-word; white-space: pre-wrap; + white-space: break-spaces; -webkit-font-variant-ligatures: none; font-variant-ligatures: none; + font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ & [contenteditable="false"] { white-space: normal; @@ -16,14 +20,22 @@ & [contenteditable="false"] [contenteditable="true"] { white-space: pre-wrap; } - pre { + & pre { white-space: pre-wrap; } } +img.ProseMirror-separator { + display: inline !important; + border: none !important; + margin: 0 !important; + width: 1px !important; + height: 1px !important; +} .ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; + margin: 0; &:after { content: ""; @@ -40,16 +52,17 @@ visibility: hidden; } } -.ProseMirror-hideselection * { - &::selection { +.ProseMirror-hideselection { + *::selection { background: transparent; } - &::-moz-selection { + *::-moz-selection { background: transparent; } - caret-color: transparent; + * { + caret-color: transparent; + } } - .ProseMirror-focused .ProseMirror-gapcursor { display: block; }