fix addKeyboardShortcuts type
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { Plugin, Transaction } from 'prosemirror-state'
|
import { Plugin, Transaction } from 'prosemirror-state'
|
||||||
|
import { Command as ProseMirrorCommand } from 'prosemirror-commands'
|
||||||
import { InputRule } from 'prosemirror-inputrules'
|
import { InputRule } from 'prosemirror-inputrules'
|
||||||
import { Editor } from './Editor'
|
import { Editor } from './Editor'
|
||||||
import mergeDeep from './utilities/mergeDeep'
|
import mergeDeep from './utilities/mergeDeep'
|
||||||
@@ -37,7 +38,7 @@ export interface ExtensionConfig<Options = any> {
|
|||||||
options: Options,
|
options: Options,
|
||||||
editor: Editor,
|
editor: Editor,
|
||||||
}) => {
|
}) => {
|
||||||
[key: string]: any
|
[key: string]: ProseMirrorCommand,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
MarkType,
|
MarkType,
|
||||||
} from 'prosemirror-model'
|
} from 'prosemirror-model'
|
||||||
import { Plugin, Transaction } from 'prosemirror-state'
|
import { Plugin, Transaction } from 'prosemirror-state'
|
||||||
|
import { Command as ProseMirrorCommand } from 'prosemirror-commands'
|
||||||
import { InputRule } from 'prosemirror-inputrules'
|
import { InputRule } from 'prosemirror-inputrules'
|
||||||
import { ExtensionConfig } from './Extension'
|
import { ExtensionConfig } from './Extension'
|
||||||
import mergeDeep from './utilities/mergeDeep'
|
import mergeDeep from './utilities/mergeDeep'
|
||||||
@@ -80,7 +81,7 @@ export interface MarkConfig<Options = any> extends Overwrite<ExtensionConfig<Opt
|
|||||||
editor: Editor,
|
editor: Editor,
|
||||||
type: MarkType,
|
type: MarkType,
|
||||||
}) => {
|
}) => {
|
||||||
[key: string]: any
|
[key: string]: ProseMirrorCommand,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// @ts-nocheck
|
|
||||||
import {
|
import {
|
||||||
DOMOutputSpec,
|
DOMOutputSpec,
|
||||||
NodeSpec,
|
NodeSpec,
|
||||||
Node as ProseMirrorNode,
|
Node as ProseMirrorNode,
|
||||||
NodeType,
|
NodeType,
|
||||||
} from 'prosemirror-model'
|
} from 'prosemirror-model'
|
||||||
|
import { Command as ProseMirrorCommand } from 'prosemirror-commands'
|
||||||
import { Plugin, Transaction } from 'prosemirror-state'
|
import { Plugin, Transaction } from 'prosemirror-state'
|
||||||
import { InputRule } from 'prosemirror-inputrules'
|
import { InputRule } from 'prosemirror-inputrules'
|
||||||
import { ExtensionConfig } from './Extension'
|
import { ExtensionConfig } from './Extension'
|
||||||
@@ -138,8 +138,7 @@ export interface NodeConfig<Options = any> extends Overwrite<ExtensionConfig<Opt
|
|||||||
editor: Editor,
|
editor: Editor,
|
||||||
type: NodeType,
|
type: NodeType,
|
||||||
}) => {
|
}) => {
|
||||||
// [key: string]: any
|
[key: string]: ProseMirrorCommand,
|
||||||
[key: string]: () => boolean
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -292,6 +291,8 @@ export class Node<Options = any> {
|
|||||||
onFocus: null,
|
onFocus: null,
|
||||||
onBlur: null,
|
onBlur: null,
|
||||||
onDestroy: null,
|
onDestroy: null,
|
||||||
|
// TODO: remove,
|
||||||
|
tableRole: null,
|
||||||
}
|
}
|
||||||
|
|
||||||
options!: Options
|
options!: Options
|
||||||
|
|||||||
Reference in New Issue
Block a user