Merge branch 'master' into v1.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tiptap-extensions",
|
"name": "tiptap-extensions",
|
||||||
"version": "0.21.0",
|
"version": "0.21.1",
|
||||||
"description": "Extensions for tiptap",
|
"description": "Extensions for tiptap",
|
||||||
"homepage": "https://tiptap.scrumpy.io",
|
"homepage": "https://tiptap.scrumpy.io",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -36,14 +36,14 @@ export default class Mention extends Node {
|
|||||||
class: this.options.mentionClass,
|
class: this.options.mentionClass,
|
||||||
'data-mention-id': node.attrs.id,
|
'data-mention-id': node.attrs.id,
|
||||||
},
|
},
|
||||||
`@${node.attrs.label}`,
|
`${this.options.matcher.char}${node.attrs.label}`,
|
||||||
],
|
],
|
||||||
parseDOM: [
|
parseDOM: [
|
||||||
{
|
{
|
||||||
tag: 'span[data-mention-id]',
|
tag: 'span[data-mention-id]',
|
||||||
getAttrs: dom => {
|
getAttrs: dom => {
|
||||||
const id = dom.getAttribute('data-mention-id')
|
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 }
|
return { id, label }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user