@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
9 lines (8 loc) • 448 B
TypeScript
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
export type InputRuleHandler = (state: EditorState, matchResult: RegExpExecArray, start: number, end: number) => Transaction | null;
export type OnHandlerApply = (state: EditorState, tr: Transaction, matchResult: RegExpExecArray) => void;
export interface InputRuleWrapper {
match: RegExp;
handler: InputRuleHandler;
onHandlerApply?: OnHandlerApply;
}