import { InputRule } from "prosemirror-inputrules"; import { NodeType, Schema } from "prosemirror-model"; import { EditorState, Transaction } from "prosemirror-state"; import { CommonmarkParserFeatures } from "../shared/view"; export declare const emphasisRegexAsterisk: RegExp; export interface ExtendedInputRule extends InputRule { handler: (state: EditorState, match: RegExpExecArray, start: number, end: number) => Transaction | null; } /** * Creates an input rule that uses ProseMirror’s textblockTypeInputRule to replace matching text * with a node of the given type. After the conversion, insertParagraphIfAtDocEnd is called to ensure * that an empty paragraph is added if the new node is at the document’s end. * * @param regexp - The regular expression to match (e.g. `/^```$/`). * @param nodeType - The node type to be created (for example, a code block). * @returns An InputRule that performs the transformation. */ export declare function textblockTypeTrailingParagraphInputRule(regexp: RegExp, nodeType: NodeType): InputRule; /** * Defines all input rules we're using in our rich-text editor. * Input rules are formatting operations that trigger as you type based on regular expressions * * Examples: * * starting a line with "# " will turn the line into a headline * * starting a line with "> " will insert a new blockquote in place */ export declare const richTextInputRules: (schema: Schema, features: CommonmarkParserFeatures) => import("prosemirror-state").Plugin<{ transform: Transaction; from: number; to: number; text: string; }>;