medium-proeditor
Version:
A powerful & customizable Medium-style rich text editor
16 lines • 822 B
TypeScript
import type { NodeType } from 'prosemirror-model';
import { InputRule, type InputRuleFinder } from '../InputRule';
import type { ExtendedRegExpMatchArray } from '../types';
/**
* Build an input rule that changes the type of a textblock when the
* matched text is typed into it. When using a regular expresion you’ll
* probably want the regexp to start with `^`, so that the pattern can
* only occur at the start of a textblock.
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules
*/
export declare function textblockTypeInputRule(config: {
find: InputRuleFinder;
type: NodeType;
getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
}): InputRule;
//# sourceMappingURL=textblockTypeInputRule.d.ts.map