mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 数学公式支持设置全局宏定义 https://github.com/siyuan-note/siyuan/issues/5682
This commit is contained in:
parent
60d948606d
commit
d510a74aab
2 changed files with 6 additions and 0 deletions
|
|
@ -87,6 +87,10 @@ func setEditor(c *gin.Context) {
|
||||||
editor.PlantUMLServePath = "https://www.plantuml.com/plantuml/svg/~1"
|
editor.PlantUMLServePath = "https://www.plantuml.com/plantuml/svg/~1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if "" == editor.KaTexMacros {
|
||||||
|
editor.KaTexMacros = "{}"
|
||||||
|
}
|
||||||
|
|
||||||
model.Conf.Editor = editor
|
model.Conf.Editor = editor
|
||||||
model.Conf.Save()
|
model.Conf.Save()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ type Editor struct {
|
||||||
BlockRefDynamicAnchorTextMaxLen int `json:"blockRefDynamicAnchorTextMaxLen"` // 块引动态锚文本最大长度
|
BlockRefDynamicAnchorTextMaxLen int `json:"blockRefDynamicAnchorTextMaxLen"` // 块引动态锚文本最大长度
|
||||||
PlantUMLServePath string `json:"plantUMLServePath"` // PlantUML 伺服地址
|
PlantUMLServePath string `json:"plantUMLServePath"` // PlantUML 伺服地址
|
||||||
FullWidth bool `json:"fullWidth"` // 是否使用最大宽度
|
FullWidth bool `json:"fullWidth"` // 是否使用最大宽度
|
||||||
|
KaTexMacros string `json:"kaTexMacros"` // KeTex 宏定义
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewEditor() *Editor {
|
func NewEditor() *Editor {
|
||||||
|
|
@ -51,5 +52,6 @@ func NewEditor() *Editor {
|
||||||
BlockRefDynamicAnchorTextMaxLen: 96,
|
BlockRefDynamicAnchorTextMaxLen: 96,
|
||||||
PlantUMLServePath: "https://www.plantuml.com/plantuml/svg/~1",
|
PlantUMLServePath: "https://www.plantuml.com/plantuml/svg/~1",
|
||||||
FullWidth: true,
|
FullWidth: true,
|
||||||
|
KaTexMacros: "{}",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue