@launchmenu/core
Version:
An environment for visual keyboard controlled applets
21 lines • 1.08 kB
TypeScript
import { ITextField } from "../_types/ITextField";
import { ITextSelection } from "../_types/ITextSelection";
import { ITextAlterationInput } from "./commands/_types/ITextAlterationInput";
import { ITextEditCommand } from "./commands/_types/ITextEditCommand";
import { ITextEditTarget } from "./_types/ITextEditTarget";
/**
* Performs a text edit using a normalized callback, either passing a command or performing the alteration immediately
* @param target The target of the text change
* @param edit The callback to perform the text change
*/
export declare function performNormalizedTextEdit(target: ITextEditTarget, edit: (textField: ITextField, undoable: boolean) => ITextEditCommand | {
alterations: ITextAlterationInput[];
selection?: ITextSelection;
}): void;
/**
* Retrieves the text field given a text edit target
* @param targetField The text edit target
* @returns The text field
*/
export declare const getEditTargetTextField: (targetField: ITextEditTarget) => ITextField;
//# sourceMappingURL=performNormalizedTextEdit.d.ts.map