fix: Improve paste handler parsing for more cases, specifically Google Docs (#3322)

This commit is contained in:
Tom Moor
2022-04-01 15:13:44 -07:00
committed by GitHub
parent d119ed8963
commit f48c86c56d
4 changed files with 30 additions and 3 deletions

View File

@@ -12,7 +12,14 @@ export default class Italic extends Mark {
get schema(): MarkSpec {
return {
parseDOM: [{ tag: "i" }, { tag: "em" }],
parseDOM: [
{ tag: "i" },
{ tag: "em" },
{
style: "font-style",
getAttrs: (value) => (value === "italic" ? null : false),
},
],
toDOM: () => ["em"],
};
}