mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Supports setting the spell check language on desktop https://github.com/siyuan-note/siyuan/issues/16524
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
2e40a53802
commit
5bef3bf817
2 changed files with 4 additions and 4 deletions
|
|
@ -48,7 +48,7 @@ type Editor struct {
|
|||
Justify bool `json:"justify"` // 是否两端对齐
|
||||
RTL bool `json:"rtl"` // 是否从右到左显示
|
||||
Spellcheck bool `json:"spellcheck"` // 是否启用拼写检查
|
||||
SpellcheckLanguage string `json:"spellcheckLanguage"` // 拼写检查语言
|
||||
SpellcheckLanguages []string `json:"spellcheckLanguages"` // 拼写检查语言
|
||||
OnlySearchForDoc bool `json:"onlySearchForDoc"` // 是否启用 [[ 仅搜索文档块
|
||||
BacklinkExpandCount int `json:"backlinkExpandCount"` // 反向链接默认展开数量
|
||||
BackmentionExpandCount int `json:"backmentionExpandCount"` // 反链提及默认展开数量
|
||||
|
|
@ -90,7 +90,7 @@ func NewEditor() *Editor {
|
|||
Justify: false,
|
||||
RTL: false,
|
||||
Spellcheck: false,
|
||||
SpellcheckLanguage: "en-US",
|
||||
SpellcheckLanguages: []string{"en-US"},
|
||||
BacklinkExpandCount: 8,
|
||||
BackmentionExpandCount: -1,
|
||||
BacklinkContainChildren: true,
|
||||
|
|
|
|||
|
|
@ -282,8 +282,8 @@ func InitConf() {
|
|||
if conf.MinDynamicLoadBlocks > Conf.Editor.DynamicLoadBlocks {
|
||||
Conf.Editor.DynamicLoadBlocks = conf.MinDynamicLoadBlocks
|
||||
}
|
||||
if "" == Conf.Editor.SpellcheckLanguage {
|
||||
Conf.Editor.SpellcheckLanguage = "en-US"
|
||||
if 1 > len(Conf.Editor.SpellcheckLanguages) {
|
||||
Conf.Editor.SpellcheckLanguages = []string{"en-US"}
|
||||
}
|
||||
if 0 > Conf.Editor.BacklinkExpandCount {
|
||||
Conf.Editor.BacklinkExpandCount = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue