mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix lint
This commit is contained in:
parent
d87a0d5694
commit
b21df879c6
@ -184,7 +184,7 @@ import {
|
||||
Strike,
|
||||
Underline,
|
||||
Link,
|
||||
History,
|
||||
History
|
||||
} from 'tiptap-extensions'
|
||||
import Mention from './nodes/Mention.js'
|
||||
|
||||
@ -535,7 +535,7 @@ li > p {
|
||||
|
||||
.editor {
|
||||
.mention-suggestion {
|
||||
color: $color-primary
|
||||
color: $color-primary;
|
||||
}
|
||||
&__floating-menu {
|
||||
position: absolute;
|
||||
|
||||
@ -4,22 +4,25 @@ import { Mention as TipTapMention } from 'tiptap-extensions'
|
||||
|
||||
export default class Mention extends TipTapMention {
|
||||
get schema() {
|
||||
const schema = super.schema
|
||||
schema.attrs = {
|
||||
const patchedSchema = super.schema
|
||||
|
||||
patchedSchema.attrs = {
|
||||
url: {},
|
||||
label: {},
|
||||
},
|
||||
schema.toDOM = node => [
|
||||
'a',
|
||||
{
|
||||
class: this.options.mentionClass,
|
||||
href: node.attrs.url,
|
||||
},
|
||||
`${this.options.matcher.char}${node.attrs.label}`
|
||||
]
|
||||
schema.parseDOM = [
|
||||
label: {}
|
||||
}
|
||||
patchedSchema.toDOM = node => {
|
||||
return [
|
||||
'a',
|
||||
{
|
||||
class: this.options.mentionClass,
|
||||
href: node.attrs.url
|
||||
},
|
||||
`${this.options.matcher.char}${node.attrs.label}`
|
||||
]
|
||||
}
|
||||
patchedSchema.parseDOM = [
|
||||
// this is not implemented
|
||||
]
|
||||
return schema
|
||||
return patchedSchema
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user