Files
tiptap/examples/plugins/Mention.js
Philipp Kühn d111afe7ac initial commit
2018-08-20 23:02:21 +02:00

31 lines
403 B
JavaScript

import { Node } from 'vue-mirror/utils'
export default class MentionNode extends Node {
get name() {
return 'mention'
}
get schema() {
return {
attrs: {
id: {
default: null,
},
},
group: 'inline',
inline: true,
draggable: true,
toDOM: node => [
'span',
{
dataId: node.attrs.id,
class: 'mention',
},
`@${node.attrs.id}`,
],
}
}
}