mirror of
https://github.com/ryanpcmcquen/obsidian-javascript-init.git
synced 2026-07-22 06:00:30 +00:00
It works!
Signed-off-by: Ryan McQuen <rpcm@linux.com>
This commit is contained in:
parent
0a5bd4d394
commit
567b95a0ed
1 changed files with 13 additions and 4 deletions
17
main.ts
17
main.ts
|
|
@ -21,7 +21,7 @@ export default class JavaScriptInitPlugin extends Plugin {
|
|||
|
||||
await this.loadSettings();
|
||||
|
||||
this.addRibbonIcon("dice", "Run Init JavaScript", () => {
|
||||
this.addRibbonIcon("any-key", "Run Init JavaScript", () => {
|
||||
this.runCode();
|
||||
});
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ class JavaScriptInitSettingTab extends PluginSettingTab {
|
|||
|
||||
containerEl.empty();
|
||||
|
||||
containerEl.createEl("h2", { text: "JavaScript Init Settings." });
|
||||
containerEl.createEl("h2", { text: "JavaScript Init Settings" });
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Code")
|
||||
|
|
@ -83,8 +83,17 @@ class JavaScriptInitSettingTab extends PluginSettingTab {
|
|||
await this.plugin.saveSettings();
|
||||
});
|
||||
|
||||
resultant.inputEl.style.fontFamily = "monospace";
|
||||
resultant.inputEl.style.width = "100%";
|
||||
const textArea = resultant.inputEl;
|
||||
const textAreaWrapper =
|
||||
textArea.parentNode as unknown as HTMLDivElement;
|
||||
|
||||
textAreaWrapper.style.width = "100%";
|
||||
textAreaWrapper.style.display = "flex";
|
||||
textAreaWrapper.style.flexDirection = "row";
|
||||
|
||||
textArea.style.fontFamily = "monospace";
|
||||
textArea.style.fontSize = "80%";
|
||||
textArea.style.flex = "1";
|
||||
|
||||
return resultant;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue