mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Got Tags as # in the editor as an extension to work
This commit is contained in:
parent
49568259b0
commit
4725b8cbd2
@ -625,6 +625,9 @@ li > p {
|
||||
.mention-suggestion {
|
||||
color: $color-primary;
|
||||
}
|
||||
.tag-suggestion {
|
||||
color: $color-primary;
|
||||
}
|
||||
&__floating-menu {
|
||||
position: absolute;
|
||||
margin-top: -0.25rem;
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user