mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
feat: turn off spellcheck for inline-code
This commit is contained in:
@@ -39,9 +39,10 @@ function toggleInlineCode(editor) {
|
||||
const node = editor.selection.getNode();
|
||||
|
||||
if (node.tagName !== TAGNAME && range.startOffset === range.endOffset) {
|
||||
editor.selection.setContent("<code></code>");
|
||||
editor.selection.setContent(`<code spellcheck="false"></code>`);
|
||||
} else {
|
||||
editor.execCommand("mceToggleFormat", false, "code");
|
||||
const content = editor.selection.getContent();
|
||||
editor.selection.setContent(`<code spellcheck="false">${content}</code>`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
.mce-content-body code[data-mce-selected="inline-boundary"] {
|
||||
background-color: rgb(27 31 35 / 5%);
|
||||
}
|
||||
|
||||
.mce-content-body code {
|
||||
background-color: rgb(27 31 35 / 5%);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: ui-monospace, SFMono-Regular, SF Mono, Consolas, Liberation Mono,
|
||||
Menlo, monospace !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
Reference in New Issue
Block a user