修复编辑器红色波浪线:关闭 Chromium 拼写检查 (spellcheck=false) + CSS 兜底

This commit is contained in:
hunter-dev
2026-08-31 00:04:00 +08:00
parent 3cc36c6450
commit 144e1a57c7
3 changed files with 61 additions and 0 deletions
+7
View File
@@ -31,6 +31,13 @@ svg { display: block; }
margin: 0 auto;
caret-color: var(--accent);
}
/* 兜底:去掉拼写/语法错误的红色波浪下划线(即使个别 contenteditable 仍开启 spellcheck) */
.tiptap-wrap [contenteditable="true"] :spelling-error,
.tiptap-wrap [contenteditable="true"] :grammar-error,
.tiptap-wrap .ProseMirror :spelling-error,
.tiptap-wrap .ProseMirror :grammar-error {
text-decoration: none;
}
.tiptap-wrap .ProseMirror p { margin: 0.6em 0; }
.tiptap-wrap .ProseMirror h1 { font-size: 1.8em; margin: 1em 0 0.5em; font-weight: 700; color: var(--text-primary); padding-bottom: 0.25em; border-bottom: 1px solid var(--control-border); }
.tiptap-wrap .ProseMirror h2 { font-size: 1.5em; margin: 0.9em 0 0.45em; font-weight: 600; color: var(--text-primary); }