mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 22:36:14 +08:00
fix char for mentions
This commit is contained in:
parent
287a2bc523
commit
45fa5a01d4
@ -36,14 +36,14 @@ export default class MentionNode extends Node {
|
||||
class: this.options.mentionClass,
|
||||
'data-mention-id': node.attrs.id,
|
||||
},
|
||||
`@${node.attrs.label}`,
|
||||
`${this.options.matcher.char}${node.attrs.label}`,
|
||||
],
|
||||
parseDOM: [
|
||||
{
|
||||
tag: 'span[data-mention-id]',
|
||||
getAttrs: dom => {
|
||||
const id = dom.getAttribute('data-mention-id')
|
||||
const label = dom.innerText.split('@').join('')
|
||||
const label = dom.innerText.split(this.options.matcher.char).join('')
|
||||
return { id, label }
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user