Skip to content

Files

Latest commit

 

History

History
47 lines (34 loc) · 753 Bytes

plugin-code.md

File metadata and controls

47 lines (34 loc) · 753 Bytes

@aomao/plugin-code

Inline code style plugin

Installation

$ yarn add @aomao/plugin-code

Add to engine

import Engine, {EngineInterface} from'@aomao/engine';
import Code from'@aomao/plugin-code';

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

Optional

Hotkey

The default shortcut key is mod+e, and multiple shortcut keys are passed in as an array

//hotkey,
hotkey?: string | Array<string>;

//Use configuration
new Engine(...,{
    config:{
        "code":{
            //Modify shortcut keys
            hotkey: "shortcut key"
        }
    }
 })

Command

engine.command.execute('code');
//Use command to execute query current status, return boolean | undefined
engine.command.queryState('code');