fix: editor content survives theme HMR + bullet marker styling + indent control
This commit is contained in:
@@ -178,8 +178,7 @@ function BlockNoteTab({ content, entries, onNavigateWikilink }: { content: strin
|
||||
editor.replaceBlocks(editor.document, withWikilinks)
|
||||
}
|
||||
load()
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [body])
|
||||
}, [body, editor])
|
||||
|
||||
// Click handler for wikilinks
|
||||
useEffect(() => {
|
||||
|
||||
@@ -78,6 +78,18 @@
|
||||
margin-bottom: var(--lists-item-spacing);
|
||||
}
|
||||
|
||||
/* Bullet marker styling — BlockNote uses ::before or a span for the bullet */
|
||||
.editor__blocknote-container [data-content-type="bulletListItem"] .bn-block-content::before,
|
||||
.editor__blocknote-container [data-content-type="bulletListItem"] li::marker {
|
||||
font-size: var(--lists-bullet-size) !important;
|
||||
color: var(--lists-bullet-color) !important;
|
||||
}
|
||||
|
||||
/* List indentation */
|
||||
.editor__blocknote-container .bn-block-group .bn-block-group {
|
||||
margin-left: var(--lists-indent-size);
|
||||
}
|
||||
|
||||
/* --- Numbered lists --- */
|
||||
.editor__blocknote-container [data-content-type="numberedListItem"] {
|
||||
padding-left: var(--lists-padding-left);
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
},
|
||||
"lists": {
|
||||
"bulletSymbol": "•",
|
||||
"bulletSize": 14,
|
||||
"bulletSize": 30,
|
||||
"bulletColor": "var(--text-tertiary)",
|
||||
"indentSize": 24,
|
||||
"itemSpacing": 4,
|
||||
|
||||
Reference in New Issue
Block a user