You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
506 B

import { Extension } from '@tiptap/core'
import { dropCursor } from 'prosemirror-dropcursor'
export interface DropcursorOptions {
color: string | undefined,
width: number | undefined,
class: string | undefined,
}
export const Dropcursor = Extension.create<DropcursorOptions>({
name: 'dropCursor',
addOptions() {
return {
color: 'currentColor',
width: 1,
class: undefined,
}
},
addProseMirrorPlugins() {
return [
dropCursor(this.options),
]
},
})