fix: emoji replacement

This commit is contained in:
Anthony Fu 2022-12-27 21:42:58 +01:00
parent c19dd3ee0f
commit dc94d707b0
7 changed files with 40 additions and 4 deletions

View file

@ -24,6 +24,9 @@ export const Emoji = Node.create({
native: {
default: null,
},
fallback: {
default: null,
},
}
},
@ -38,6 +41,7 @@ export const Emoji = Node.create({
type: this.name,
attrs: {
native: name,
fallback: name,
},
})
},
@ -51,7 +55,10 @@ export const Emoji = Node.create({
type: this.type,
getAttributes: (match) => {
const [native] = match
return { native }
return {
native,
fallback: native,
}
},
}),
]