Skip to content

Commit 79696f0

Browse files
committed
fix(mdviewer): disable spellcheck and autocorrect in edit mode
Set spellcheck=false, autocorrect=off, autocapitalize=off on viewer-content when entering edit mode to prevent browser squiggly underlines on contenteditable text.
1 parent f3cf9b0 commit 79696f0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src-mdviewer/src/components/editor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,6 +1553,9 @@ export function initEditor() {
15531553

15541554
function enterEditMode(content) {
15551555
content.setAttribute("contenteditable", "true");
1556+
content.setAttribute("spellcheck", "false");
1557+
content.setAttribute("autocorrect", "off");
1558+
content.setAttribute("autocapitalize", "off");
15561559
content.classList.add("editing");
15571560

15581561
document.execCommand("defaultParagraphSeparator", false, "p");

0 commit comments

Comments
 (0)