interface ExtensionConfig<Options = any, Storage = any> { addCommands?: ( this: { editor: Editor; name: string; options: Options; parent: undefined | (
(...args: []) => ReturnType<Required<T>[P]>)
; storage: Storage; type: null; }, ) => Partial<RawCommands>; addExtensions?: ( this: { name: string; options: Options; parent: undefined | (
(...args: []) => Extensions)
; storage: Storage; }, ) => Extensions; addGlobalAttributes?: ( this: { extensions: (
Mark<any, any> | Node<any, any>)
[]; name: string; options: Options; parent: undefined | (
(...args: []) => GlobalAttributes)
; storage: Storage; }, ) => GlobalAttributes; addInputRules?: ( this: { editor: Editor; name: string; options: Options; parent: undefined | (
(...args: []) => InputRule[])
; storage: Storage; type: null; }, ) => InputRule[]; addKeyboardShortcuts?: ( this: { editor: Editor; name: string; options: Options; parent: | undefined | (
(...args: []) => { [key: string]: KeyboardShortcutCommand })
; storage: Storage; type: null; }, ) => { [key: string]: KeyboardShortcutCommand }; addOptions?: ( this: { name: string; parent: undefined | (
(...args: []) => Options)
}, ) => Options; addPasteRules?: ( this: { editor: Editor; name: string; options: Options; parent: undefined | (
(...args: []) => PasteRule[])
; storage: Storage; type: null; }, ) => PasteRule[]; addProseMirrorPlugins?: ( this: { editor: Editor; name: string; options: Options; parent: undefined | (
(...args: []) => Plugin<any>[])
; storage: Storage; type: null; }, ) => Plugin<any>[]; addStorage?: ( this: { name: string; options: Options; parent: undefined | (
(...args: []) => Storage)
; }, ) => Storage; extendMarkSchema?: | null | (
( this: { name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; }, extension: Mark<any, any>) => Record<string, any>) | null | undefined
; storage: Storage; }, extension: Mark, ) => Record<string, any> )
; extendNodeSchema?: | null | (
( this: { name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; }, extension: Node<any, any>) => Record<string, any>) | null | undefined
; storage: Storage; }, extension: Node, ) => Record<string, any> )
; name: string; onBeforeCreate?: | null | (
( this: { editor: Editor; name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: null; parent: ... | null | undefined; }, event: { editor: Editor; }) => void) | null | undefined
; storage: Storage; type: null; }, event: { editor: Editor }, ) => void )
; onBlur?: | null | (
( this: { editor: Editor; name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: null; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; event: FocusEvent; transaction: Transaction; }) => void) | null | undefined
; storage: Storage; type: null; }, event: { editor: Editor; event: FocusEvent; transaction: Transaction }, ) => void )
; onCreate?: | null | (
( this: { editor: Editor; name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: null; parent: ... | null | undefined; }, event: { editor: Editor; }) => void) | null | undefined
; storage: Storage; type: null; }, event: { editor: Editor }, ) => void )
; onDestroy?: | null | (
( this: { editor: Editor; name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: null; parent: ... | null | undefined; }, event: void) => void) | null | undefined
; storage: Storage; type: null; }, event: void, ) => void )
; onFocus?: | null | (
( this: { editor: Editor; name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: null; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; event: FocusEvent; transaction: Transaction; }) => void) | null | undefined
; storage: Storage; type: null; }, event: { editor: Editor; event: FocusEvent; transaction: Transaction }, ) => void )
; onSelectionUpdate?: | null | (
( this: { editor: Editor; name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: null; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; transaction: Transaction; }) => void) | null | undefined
; storage: Storage; type: null; }, event: { editor: Editor; transaction: Transaction }, ) => void )
; onTransaction?: | null | (
( this: { editor: Editor; name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: null; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; transaction: Transaction; appendedTransactions: Transaction[]; }) => void) | null | undefined
; storage: Storage; type: null; }, event: { appendedTransactions: Transaction[]; editor: Editor; transaction: Transaction; }, ) => void )
; onUpdate?: | null | (
( this: { editor: Editor; name: string; options: Options; parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: null; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; transaction: Transaction; appendedTransactions: Transaction[]; }) => void) | null | undefined
; storage: Storage; type: null; }, event: { appendedTransactions: Transaction[]; editor: Editor; transaction: Transaction; }, ) => void )
; priority?: number;}
This function adds commands to the editor