🎨 桌面端和浏览器端支持英文拼写检查 https://github.com/siyuan-note/siyuan/issues/597

This commit is contained in:
Liang Ding 2022-12-30 11:27:26 +08:00
parent 40bbc6cc98
commit fc66472637
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
13 changed files with 29 additions and 3 deletions

View file

@ -42,6 +42,7 @@ type Editor struct {
DynamicLoadBlocks int `json:"dynamicLoadBlocks"` // 块动态数,可配置区间 [48, 1024]
Justify bool `json:"justify"` // 是否两端对齐
RTL bool `json:"rtl"` // 是否从右到左显示
Spellcheck bool `json:"spellcheck"` // 是否启用拼写检查
}
func NewEditor() *Editor {

View file

@ -6,7 +6,7 @@ require (
github.com/88250/clipboard v0.1.5
github.com/88250/css v0.1.2
github.com/88250/gulu v1.2.3-0.20221117052724-cd06804db798
github.com/88250/lute v1.7.5-0.20221228091547-322f538d4f33
github.com/88250/lute v1.7.5-0.20221230030827-df878c76f85d
github.com/88250/pdfcpu v0.3.13
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ConradIrwin/font v0.0.0-20210318200717-ce8d41cc0732

View file

@ -19,6 +19,8 @@ github.com/88250/gulu v1.2.3-0.20221117052724-cd06804db798 h1:sR/s/Y9wyl79ZRCUER
github.com/88250/gulu v1.2.3-0.20221117052724-cd06804db798/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
github.com/88250/lute v1.7.5-0.20221228091547-322f538d4f33 h1:2A3pQE3Av78X690Q0deDMpT31ytc7PGIt4TNDBRlD9A=
github.com/88250/lute v1.7.5-0.20221228091547-322f538d4f33/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
github.com/88250/lute v1.7.5-0.20221230030827-df878c76f85d h1:EVKgCxsEpdCihMruXobiaU5tNPY6dxJL2/F8MJ/jGq0=
github.com/88250/lute v1.7.5-0.20221230030827-df878c76f85d/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q=
github.com/88250/pdfcpu v0.3.13/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=

View file

@ -451,6 +451,7 @@ func NewLute() (ret *lute.Lute) {
ret.SetCodeSyntaxHighlightLineNum(Conf.Editor.CodeSyntaxHighlightLineNum)
ret.SetChineseParagraphBeginningSpace(Conf.Export.ParagraphBeginningSpace)
ret.SetProtyleMarkNetImg(Conf.Editor.DisplayNetImgMark)
ret.SetSpellcheck(Conf.Editor.Spellcheck)
customEmojiMap := map[string]string{}
CustomEmojis.Range(func(key, value interface{}) bool {