react-mde
Version:
React Markdown Editor
13 lines (12 loc) • 450 B
TypeScript
export declare const INSERT_TEXT_AT_CURSOR = "INSERT_TEXT_AT_CURSOR";
export declare const SELECT_RANGE = "SELECT_RANGE";
export interface InsertTextAtCursorInstruction {
type: typeof INSERT_TEXT_AT_CURSOR;
text: string;
}
export interface SelectRangeInstruction {
type: typeof SELECT_RANGE;
selectionStart: number;
selectionEnd: number;
}
export declare type Instruction = InsertTextAtCursorInstruction | SelectRangeInstruction;