am-editor11212/docs/plugin/plugin-redo.md

788 B

@aomao/plugin-redo

Redo history plugin

Installation

$ yarn add @aomao/plugin-redo

Add to engine

import Engine, {EngineInterface} from'@aomao/engine';
import Redo from'@aomao/plugin-redo';

new Engine(...,{ plugins:[Redo] })

Optional

hot key

The default shortcut key is mod+y shift+mod+y

//hot key
hotkey?: string | Array<string>;
//Use configuration
new Engine(...,{
     config:{
         "redo":{
             //Modify shortcut keys
             hotkey: "shortcut key"
         }
     }
  })

Command

//Use command to execute the plug-in and pass in the required parameters
engine.command.execute('redo');
//Use command to execute query current status, return boolean | undefined
engine.command.queryState('redo');