add dropcursor options
This commit is contained in:
@@ -1,10 +1,22 @@
|
||||
import { Extension } from '@tiptap/core'
|
||||
import { dropCursor } from 'prosemirror-dropcursor'
|
||||
|
||||
type DropcursorOptions = {
|
||||
color: string | null,
|
||||
width: number | null,
|
||||
class: string | null,
|
||||
}
|
||||
|
||||
const Dropcursor = Extension.create({
|
||||
defaultOptions: <DropcursorOptions>{
|
||||
color: 'black',
|
||||
width: 1,
|
||||
class: null,
|
||||
},
|
||||
|
||||
addProseMirrorPlugins() {
|
||||
return [
|
||||
dropCursor(),
|
||||
dropCursor(this.options),
|
||||
]
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user