@tiptap/starter-kit
Version:
starter kit for tiptap
15 lines (14 loc) • 477 B
TypeScript
import { Node as ProseMirrorNode } from '@tiptap/pm/model';
/**
* Returns true if the given prosemirror node is empty.
*/
export declare function isNodeEmpty(node: ProseMirrorNode, { checkChildren, ignoreWhitespace, }?: {
/**
* When true (default), it will also check if all children are empty.
*/
checkChildren?: boolean;
/**
* When true, it will ignore whitespace when checking for emptiness.
*/
ignoreWhitespace?: boolean;
}): boolean;