fix: editor content survives theme HMR + bullet marker styling + indent control

This commit is contained in:
lucaronin
2026-02-16 08:21:23 +01:00
parent 405d5f39fc
commit 4c211e09bc
3 changed files with 14 additions and 3 deletions

View File

@@ -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(() => {

View File

@@ -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);

View File

@@ -48,7 +48,7 @@
},
"lists": {
"bulletSymbol": "•",
"bulletSize": 14,
"bulletSize": 30,
"bulletColor": "var(--text-tertiary)",
"indentSize": 24,
"itemSpacing": 4,