Files
notesnook/packages/editor/dist/extensions/taskitem/reactnodeview.d.ts
2022-05-31 06:49:37 +05:00

15 lines
638 B
TypeScript

import { NodeViewRenderer, NodeViewRendererOptions } from "@tiptap/core";
import { Decoration } from "prosemirror-view";
import { Node as ProseMirrorNode } from "prosemirror-model";
export interface ReactNodeViewRendererOptions extends NodeViewRendererOptions {
update: ((props: {
oldNode: ProseMirrorNode;
oldDecorations: Decoration[];
newNode: ProseMirrorNode;
newDecorations: Decoration[];
updateProps: () => void;
}) => boolean) | null;
as?: string;
}
export declare function ReactNodeViewRenderer(component: any, options?: Partial<ReactNodeViewRendererOptions>): NodeViewRenderer;