diff --git a/src/css/prosemirror.scss b/src/css/prosemirror.scss index de7c259a662..ff97e821362 100644 --- a/src/css/prosemirror.scss +++ b/src/css/prosemirror.scss @@ -86,10 +86,16 @@ div.ProseMirror { } } - > *:first-child { + // Widgets such as the gap cursor don't take space, so make sure the top margin + // goes into the first real node. + > *:nth-child(1 of :not(:where(.ProseMirror-widget))) { margin-top: 10px; } + > .ProseMirror-gapcursor:first-child::after { + top: 8px; + } + > h1, h2, h3, diff --git a/src/css/style.scss b/src/css/style.scss index b58844f09ea..cc6b87d54f6 100644 --- a/src/css/style.scss +++ b/src/css/style.scss @@ -46,26 +46,10 @@ li.ProseMirror-selectednode { } } -.ProseMirror-gapcursor { - display: none; - pointer-events: none; - position: absolute; - - &:after { - content: ''; - display: block; - position: absolute; - top: -2px; - width: 20px; - border-top: 1px solid var(--color-main-text); - animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; - } -} - -@keyframes ProseMirror-cursor-blink { - to { - visibility: hidden; - } +// Tiptap injects its own gap cursor stylesheet (black cursor) after ours, +// so the theme colour needs a more specific selector to win. +.ProseMirror .ProseMirror-gapcursor:after { + border-top-color: var(--color-main-text); } .animation-rotate { diff --git a/src/nodes/Table/TableView.vue b/src/nodes/Table/TableView.vue index 7e6b9d8a929..6355f348315 100644 --- a/src/nodes/Table/TableView.vue +++ b/src/nodes/Table/TableView.vue @@ -144,6 +144,9 @@ export default {