mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 07:40:13 +08:00
add dropcursor options
This commit is contained in:
parent
107a6d7813
commit
8146dd0842
@ -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),
|
||||
]
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user