INNER CODE UNIT · JavaScript
CalendarPlugin
obgnail/typora_plugin · plugin/calendar/index.js:1
class CalendarPlugin extends BasePlugin {
Calendar = null
hotkey = () => [{ hotkey: this.config.HOTKEY, callback: this.call }]
call = () => this.utils.insertBlockCode(null, this.config.LANGUAGE, this.config.TEMPLATE)
process = () => {
const parser = this.utils.thirdPartyDiagramParser
parser.register({
lang: this.config.LANGUAGE,
mappingLang: "javascript",
destroyWhenUpdate: false,
interactiveMode: this.config.INTERACTIVE_MODE,
metaConfigSchema: parser.helpers.styleMetaConfigSchema.wrapDefaultStyle({
height: this.config.DEFAULT_FENCE_HEIGHT,
backgroundColor: this.config.DEFAULT_FENCE_BACKGROUND_COLOR,
}),