Got Tags as # in the editor as an extension to work

This commit is contained in:
Wolfgang Huß 2019-06-19 09:12:26 +02:00
parent 49568259b0
commit 4725b8cbd2
3 changed files with 17 additions and 6 deletions

View File

@ -625,6 +625,9 @@ li > p {
.mention-suggestion {
color: $color-primary;
}
.tag-suggestion {
color: $color-primary;
}
&__floating-menu {
position: absolute;
margin-top: -0.25rem;

View File

@ -1,6 +1,10 @@
import { Mention as TipTapMention } from 'tiptap-extensions'
export default class Mention extends TipTapMention {
get name() {
return 'mention'
}
get schema() {
const patchedSchema = super.schema
@ -19,9 +23,9 @@ export default class Mention extends TipTapMention {
`${this.options.matcher.char}${node.attrs.label}`,
]
}
// patchedSchema.parseDOM = [
// // this is not implemented
// ]
patchedSchema.parseDOM = [
// this is not implemented
]
return patchedSchema
}
}

View File

@ -1,6 +1,10 @@
import { Mention as TipTapMention } from 'tiptap-extensions'
export default class Tag extends TipTapMention {
get name() {
return 'tag'
}
get defaultOptions() {
return {
matcher: {
@ -31,9 +35,9 @@ export default class Tag extends TipTapMention {
`${this.options.matcher.char}${node.attrs.label}`,
]
}
// patchedSchema.parseDOM = [
// // this is not implemented
// ]
patchedSchema.parseDOM = [
// this is not implemented
]
return patchedSchema
}
}