UNPKG

@syncfusion/ej2-richtexteditor

Version:
91 lines (90 loc) 2.31 kB
import { MarkdownParser } from './../base/markdown-parser'; import { IMarkdownSubCommands, IMDKeyboardEvent, MarkdownUndoRedoData } from './../base/interface'; import { IUndoCallBack } from '../../common/interface'; /** * `Undo` module is used to handle undo actions. */ export declare class UndoRedoCommands { steps: number; undoRedoStack: MarkdownUndoRedoData[]; private parent; private selection; private currentAction; undoRedoSteps: number; undoRedoTimer: number; constructor(parent?: MarkdownParser, options?: { [key: string]: number; }); protected addEventListener(): void; private onPropertyChanged; protected removeEventListener(): void; /** * Destroys the ToolBar. * * @function destroy * @returns {void} * @hidden * @private */ destroy(): void; /** * onAction method * * @param {IMarkdownSubCommands} e - specifies the sub commands * @returns {void} * @hidden * @private */ onAction(e: IMarkdownSubCommands): void; private keyDown; private keyUp; /** * MD collection stored string format. * * @param {KeyboardEvent} e - specifies the key board event * @function saveData * @returns {void} * @hidden * @private */ saveData(e?: KeyboardEvent | MouseEvent | IUndoCallBack): void; /** * Undo the editable text. * * @param {IMarkdownSubCommands} e - specifies the sub commands * @function undo * @returns {void} * @hidden * @private */ undo(e?: IMarkdownSubCommands | IMDKeyboardEvent): void; /** * Redo the editable text. * * @param {IMarkdownSubCommands} e - specifies the sub commands * @function redo * @returns {void} * @hidden * @private */ redo(e?: IMarkdownSubCommands | IMDKeyboardEvent): void; private restore; /** * getUndoStatus method * * @returns {boolean} - returns the boolean value * @hidden * @private */ getUndoStatus(): { [key: string]: boolean; }; getCurrentStackIndex(): number; /** * Clears the undo and redo stacks and reset the steps to null.. * * @returns {void} * @public */ clear(): void; }