Skip to content

Commit

Permalink
6.0.1
Browse files Browse the repository at this point in the history
Made admonition creation modal easier to understand
  • Loading branch information
valentine195 committed Jun 22, 2021
1 parent 6521c0b commit 63807f2
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ class SettingsModal extends Modal {

contentEl.appendChild(admonitionPreview);
let typeText: TextComponent;
new Setting(settingDiv)
const typeSetting = new Setting(settingDiv)
.setName("Admonition Type")
.setDesc("This is used to create the admonition (e.g., ad-note)")
/* .setDesc("This is used to create the admonition (e.g., note or abstract)") */

.addText((text) => {
typeText = text;
Expand Down Expand Up @@ -364,6 +364,23 @@ class SettingsModal extends Modal {
titleSpan.prepend(iconEl);
});
});

typeSetting.descEl.createSpan({
text: "This is used to create the admonition (e.g., "
});
typeSetting.descEl.createEl("code", {
text: "note"
});
typeSetting.descEl.createSpan({
text: " or "
});
typeSetting.descEl.createEl("code", {
text: "abstract"
});
typeSetting.descEl.createSpan({
text: ")"
});

let iconText: TextComponent;
const iconSetting = new Setting(settingDiv)
.setName("Admonition Icon")
Expand Down

0 comments on commit 63807f2

Please sign in to comment.