From 6db81970ebc2773ea723dfe60b644766b0a238dd Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Tue, 28 May 2024 01:54:38 -0700 Subject: [PATCH 1/4] fix: cannot set text color when the text is bold --- apps/web/styles/prosemirror.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web/styles/prosemirror.css b/apps/web/styles/prosemirror.css index 7298c98b3..48ea11d8f 100644 --- a/apps/web/styles/prosemirror.css +++ b/apps/web/styles/prosemirror.css @@ -200,4 +200,8 @@ div[data-youtube-video] > iframe { div[data-youtube-video] > iframe { max-height: 100px; } +} + +span[style] > strong { + color: inherit; } \ No newline at end of file From 21003e75826a20f07354376f7f9cee126f4bf659 Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Tue, 28 May 2024 02:05:19 -0700 Subject: [PATCH 2/4] fix : bold text color + bold highlight color --- apps/web/styles/prosemirror.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web/styles/prosemirror.css b/apps/web/styles/prosemirror.css index 48ea11d8f..d5bd5e26c 100644 --- a/apps/web/styles/prosemirror.css +++ b/apps/web/styles/prosemirror.css @@ -204,4 +204,8 @@ div[data-youtube-video] > iframe { span[style] > strong { color: inherit; +} + +mark[style] > strong { + color: inherit; } \ No newline at end of file From 4bbb35bb1f097f0b5b741a496c282d6c7f7380d4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Tue, 28 May 2024 15:25:38 -0700 Subject: [PATCH 3/4] Added comment in prosemirror.css --- apps/web/styles/prosemirror.css | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/styles/prosemirror.css b/apps/web/styles/prosemirror.css index d5bd5e26c..5a437a40e 100644 --- a/apps/web/styles/prosemirror.css +++ b/apps/web/styles/prosemirror.css @@ -202,6 +202,7 @@ div[data-youtube-video] > iframe { } } +/* CSS for bold coloring and highlighting issue*/ span[style] > strong { color: inherit; } From 5ccdaf9dbcbc188dda2c416c4b511390792166ae Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Wed, 29 May 2024 08:29:05 -0700 Subject: [PATCH 4/4] updated docs --- apps/docs/guides/tailwind/setup.mdx | 48 ++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/apps/docs/guides/tailwind/setup.mdx b/apps/docs/guides/tailwind/setup.mdx index 4dfb7a37b..60e5aface 100644 --- a/apps/docs/guides/tailwind/setup.mdx +++ b/apps/docs/guides/tailwind/setup.mdx @@ -129,7 +129,7 @@ import { defaultEditorProps, EditorContent } from "novel"; .ProseMirror .is-editor-empty:first-child::before { content: attr(data-placeholder); float: left; - color: var(--novel-stone-400); + color: hsl(var(--muted-foreground)); pointer-events: none; height: 0; } @@ -142,7 +142,6 @@ import { defaultEditorProps, EditorContent } from "novel"; } /* Custom image styles */ - .ProseMirror img { transition: filter 0.1s ease-in-out; @@ -182,7 +181,6 @@ import { defaultEditorProps, EditorContent } from "novel"; } /* Custom TODO list checkboxes – shoutout to this awesome tutorial: https://moderncss.dev/pure-css-custom-checkbox-style/ */ - ul[data-type="taskList"] li > label { margin-right: 0.2rem; user-select: none; @@ -240,7 +238,6 @@ import { defaultEditorProps, EditorContent } from "novel"; } /* Overwrite tippy-box original max-width */ - .tippy-box { max-width: 400px !important; } @@ -275,6 +272,7 @@ import { defaultEditorProps, EditorContent } from "novel"; &:active { background-color: var(--novel-stone-200); transition: background-color 0.2s; + cursor: grabbing; } &.hide { @@ -292,6 +290,48 @@ import { defaultEditorProps, EditorContent } from "novel"; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' style='fill: rgba(255, 255, 255, 0.5)'%3E%3Cpath d='M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z'%3E%3C/path%3E%3C/svg%3E"); } + /* Custom Youtube Video CSS */ + iframe { + border: 8px solid #ffd00027; + border-radius: 4px; + min-width: 200px; + min-height: 200px; + display: block; + outline: 0px solid transparent; + } + + div[data-youtube-video] > iframe { + cursor: move; + aspect-ratio: 16 / 9; + width: 100%; + } + + .ProseMirror-selectednode iframe { + transition: outline 0.15s; + outline: 6px solid #fbbf24; + } + + @media only screen and (max-width: 480px) { + div[data-youtube-video] > iframe { + max-height: 50px; + } + } + + @media only screen and (max-width: 720px) { + div[data-youtube-video] > iframe { + max-height: 100px; + } + } + + /* CSS for bold coloring and highlighting issue*/ + span[style] > strong { + color: inherit; + } + + mark[style] > strong { + color: inherit; + } + ```