fix: get custom emoji id from title attribute (#1871)
parent
c76e8e8f5e
commit
fa3cfd6059
|
@ -219,7 +219,7 @@ export function treeToText(input: Node): string {
|
|||
|
||||
if (input.name === 'img' || input.name === 'picture') {
|
||||
if (input.attributes.class?.includes('custom-emoji'))
|
||||
return `:${input.attributes['data-emoji-id']}:`
|
||||
return `:${input.attributes['data-emoji-id'] || input.attributes.title}:`
|
||||
if (input.attributes.class?.includes('iconify-emoji'))
|
||||
return input.attributes.alt
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue