add vue router

This commit is contained in:
Philipp Kühn
2018-08-22 13:30:53 +02:00
parent ae1eafed09
commit 3025642dfb
6 changed files with 305 additions and 268 deletions

View File

@@ -0,0 +1,30 @@
import { Node } from 'tiptap/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}`,
],
}
}
}