nothing works

This commit is contained in:
Philipp Kühn
2020-10-29 09:26:24 +01:00
parent e960fff74f
commit 516d0da41c
7 changed files with 151 additions and 3 deletions

View File

@@ -139,6 +139,11 @@ export interface NodeExtensionSpec<Options = {}, Commands = {}> extends Overwrit
editor: Editor,
type: NodeType,
}) => Plugin[],
/**
* Node View
*/
addNodeView?: (() => any) | null,
}> {}
export type NodeExtension = Required<Omit<NodeExtensionSpec, 'defaultOptions'> & {
@@ -166,6 +171,7 @@ const defaultNode: NodeExtension = {
parseHTML: () => null,
renderHTML: null,
addAttributes: () => ({}),
addNodeView: null,
}
export function createNode<Options extends {}, Commands extends {}>(config: NodeExtensionSpec<Options, Commands>) {