import { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model'; import { InputRule, InputRuleFinder, ExtendedRegExpMatchArray } from '@tiptap/core'; /** * Build an input rule for automatically wrapping a textblock when a * given string is typed. When using a regular expression you’ll * probably want the regexp to start with `^`, so that the pattern can * only occur at the start of a textblock. * * `type` is the type of node to wrap in. * * By default, if there’s a node with the same type above/below the newly * wrapped node, the rule will try to join those * two nodes. You can pass a join before/after, which takes a regular * expression match and the node before/after the wrapped node, and can * return a boolean to indicate whether a join should happen. */ export declare function wrappingInputRule(config: { find: InputRuleFinder; type: NodeType; getAttributes?: Record | ((match: ExtendedRegExpMatchArray) => Record) | false | null; joinBefore?: (match: ExtendedRegExpMatchArray, node: ProseMirrorNode) => boolean; joinAfter?: (match: ExtendedRegExpMatchArray, node: ProseMirrorNode) => boolean; }): InputRule; //# sourceMappingURL=wrappingInputRule.d.ts.map