import { MarkSpec, MarkType } from 'prosemirror-model' import Extension, { ExtensionCallback, ExtensionExtends } from './Extension' import { Editor } from './Editor' interface MarkCallback { name: string editor: Editor options: Options type: MarkType } export interface MarkExtends extends ExtensionExtends { topMark: boolean schema: (params: Callback) => MarkSpec } export default class Mark< Options = {}, Callback = MarkCallback, Extends extends MarkExtends = MarkExtends > extends Extension { type = 'mark' public schema(value: Extends['schema']) { this.storeConfig('schema', value, 'overwrite') return this } }