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

1.1 KiB

@aomao/plugin-quote

Quote style plugin

Installation

$ yarn add @aomao/plugin-quote

Add to engine

import Engine, {EngineInterface} from'@aomao/engine';
import Quote from'@aomao/plugin-quote';

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

Optional

hot key

The default shortcut key is mod+shift+u

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

Markdown

Support markdown by default, pass in false to close

The markdown syntax of the Quote plug-in is > and it is triggered after the carriage return.

markdown?: boolean;//enabled by default, false off
//Use configuration
new Engine(...,{
    config:{
        "quote":{
            //Close markdown
            markdown:false
        }
    }
 })

Command

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