1.3 KiB
1.3 KiB
@aomao/plugin-tasklist
Task list plugin
Installation
$ yarn add @aomao/plugin-tasklist
Add to engine
import Engine, {EngineInterface} from'@aomao/engine';
import Tasklist, {CheckboxComponent} from'@aomao/plugin-tasklist';
new Engine(...,{ plugins:[Tasklist], cards:[CheckboxComponent] })
Optional
hot key
Default shortcut key mod+shift+9
//hot key
hotkey?: string | Array<string>;//default mod+shift+9
//Use configuration
new Engine(...,{
config:{
"tasklist":{
//Modify shortcut keys
hotkey: "shortcut key"
}
}
})
Markdown
Support markdown by default, pass in false
to close
Tasklist plugin markdown syntax is []
, [ ]
, [x]
markdown?: boolean;//enabled by default, false off
//Use configuration
new Engine(...,{
config:{
"tasklist":{
//Close markdown
markdown:false
}
}
})
Command
You can pass in {checked:true} to indicate checked, optional parameters
//Use command to execute the plug-in and pass in the required parameters
engine.command.execute('tasklist', { checked: boolean });
//Use command to execute query current status, return false or current list plug-in name tasklist tasklist unorderedlist
engine.command.queryState('tasklist');