fix: Improved pasting behavior from Dropbox Paper

This commit is contained in:
Tom Moor
2022-01-25 22:01:51 -08:00
parent bc40a0074a
commit 13b8ed58fd
4 changed files with 26 additions and 5 deletions

View File

@@ -40,8 +40,8 @@ export default class Code extends Mark {
get schema(): MarkSpec {
return {
excludes: "_",
parseDOM: [{ tag: "code", preserveWhitespace: true }],
toDOM: () => ["code", { spellCheck: "false" }],
parseDOM: [{ tag: "code.inline", preserveWhitespace: true }],
toDOM: () => ["code", { class: "inline", spellCheck: "false" }],
};
}