Add Page Word Count Setting
This commit is contained in:
parent
547fb32f95
commit
88a3bd1a2a
1 changed files with 12 additions and 0 deletions
|
@ -37,6 +37,18 @@ export default class BetterWordCountSettingsTab extends PluginSettingTab {
|
|||
await this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
new Setting(containerEl)
|
||||
.setName("Page Word Count")
|
||||
.setDesc("Set how many words count as one \"page\"")
|
||||
.addToggle((text: TextComponent) => {
|
||||
text.inputEl.type = "number";
|
||||
text.setPlaceholder("300");
|
||||
text.setValue(this.plugin.settings.pageWords);
|
||||
text.onChange(async (value) => {
|
||||
this.plugin.settings.pageWords = value;
|
||||
await this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
|
||||
// Status Bar Settings
|
||||
addStatusBarSettings(this.plugin, containerEl);
|
||||
|
|
Loading…
Reference in a new issue