Undo history plugin
$ yarn add @aomao/plugin-undo
Add to engine
import Engine, {EngineInterface} from'@aomao/engine';import Undo from'@aomao/plugin-undo';new Engine(...,{ plugins:[Undo] })
The default shortcut key is mod+z
shift+mod+z
//hotkeyhotkey?: string | Array<string>;//Use configurationnew Engine(...,{config:{"undo":{//Modify shortcut keyshotkey: "shortcut key"}}})
//Use command to execute the plugin and pass in the required parametersengine.command.execute('undo');//Use command to execute query current status, return boolean | undefinedengine.command.queryState('undo');