improve extending nodes and marks

This commit is contained in:
Philipp Kühn
2021-02-19 10:54:47 +01:00
parent 4a58978ffb
commit ba69a0d8f9
8 changed files with 60 additions and 106 deletions

View File

@@ -193,31 +193,9 @@ export interface MarkConfig<Options = any> extends Overwrite<ExtensionConfig<Opt
export class Mark<Options = any> {
type = 'mark'
config: Required<MarkConfig> = {
config: MarkConfig = {
name: 'mark',
defaultOptions: {},
addGlobalAttributes: () => [],
addCommands: () => ({}),
addKeyboardShortcuts: () => ({}),
addInputRules: () => [],
addPasteRules: () => [],
addProseMirrorPlugins: () => [],
inclusive: null,
excludes: null,
group: null,
spanning: null,
parseHTML: () => null,
renderHTML: null,
addAttributes: () => ({}),
extendNodeSchema: null,
extendMarkSchema: null,
onCreate: null,
onUpdate: null,
onSelection: null,
onTransaction: null,
onFocus: null,
onBlur: null,
onDestroy: null,
}
options!: Options