MCPcopy Create free account
hub / github.com/almariah/embed-code-file / onload

Method onload

main.ts:8–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6 settings: EmbedCodeFileSettings;
7
8 async onload() {
9 await this.loadSettings();
10
11 this.addSettingTab(new EmbedCodeFileSettingTab(this.app, this));
12
13 this.registerMarkdownPostProcessor((element, context) => {
14 this.addTitle(element, context);
15 });
16
17 // live preview renderers
18 const supportedLanguages = this.settings.includedLanguages.split(",")
19 supportedLanguages.forEach(l => {
20 console.log(`registering renderer for ${l}`)
21 this.registerRenderer(l)
22 });
23 }
24
25 async loadSettings() {
26 this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());

Callers

nothing calls this directly

Calls 3

loadSettingsMethod · 0.95
addTitleMethod · 0.95
registerRendererMethod · 0.95

Tested by

no test coverage detected