import { MarkSpec, MarkType } from 'prosemirror-model' import Extension, { ExtensionMethods } from './Extension' import { Editor } from './Editor' export interface MarkProps { name: string editor: Editor options: Options type: MarkType } export interface MarkMethods extends ExtensionMethods { topMark: boolean schema: (params: Omit) => MarkSpec } export default class Mark< Options = {}, Props = MarkProps, Methods extends MarkMethods = MarkMethods > extends Extension { type = 'mark' public schema(value: Methods['schema']) { this.storeConfig('schema', value, 'overwrite') return this } }