mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Supports disabling Markdown syntax input for some inline elements https://github.com/siyuan-note/siyuan/issues/11141
This commit is contained in:
parent
53f5b08038
commit
b9f269ae85
17 changed files with 185 additions and 41 deletions
|
|
@ -16,38 +16,41 @@
|
|||
|
||||
package conf
|
||||
|
||||
import "github.com/siyuan-note/siyuan/kernel/util"
|
||||
|
||||
type Editor struct {
|
||||
FontSize int `json:"fontSize"` // 字体大小
|
||||
FontSizeScrollZoom bool `json:"fontSizeScrollZoom"` // 字体大小是否支持滚轮缩放
|
||||
FontFamily string `json:"fontFamily"` // 字体
|
||||
CodeSyntaxHighlightLineNum bool `json:"codeSyntaxHighlightLineNum"` // 代码块是否显示行号
|
||||
CodeTabSpaces int `json:"codeTabSpaces"` // 代码块中 Tab 转换空格数,配置为 0 则表示不转换
|
||||
CodeLineWrap bool `json:"codeLineWrap"` // 代码块是否自动折行
|
||||
CodeLigatures bool `json:"codeLigatures"` // 代码块是否连字
|
||||
DisplayBookmarkIcon bool `json:"displayBookmarkIcon"` // 是否显示书签图标
|
||||
DisplayNetImgMark bool `json:"displayNetImgMark"` // 是否显示网络图片角标
|
||||
GenerateHistoryInterval int `json:"generateHistoryInterval"` // 生成历史时间间隔,单位:分钟
|
||||
HistoryRetentionDays int `json:"historyRetentionDays"` // 历史保留天数
|
||||
Emoji []string `json:"emoji"` // 常用表情
|
||||
VirtualBlockRef bool `json:"virtualBlockRef"` // 是否启用虚拟引用
|
||||
VirtualBlockRefExclude string `json:"virtualBlockRefExclude"` // 虚拟引用关键字排除列表
|
||||
VirtualBlockRefInclude string `json:"virtualBlockRefInclude"` // 虚拟引用关键字包含列表
|
||||
BlockRefDynamicAnchorTextMaxLen int `json:"blockRefDynamicAnchorTextMaxLen"` // 块引动态锚文本最大长度
|
||||
PlantUMLServePath string `json:"plantUMLServePath"` // PlantUML 伺服地址
|
||||
FullWidth bool `json:"fullWidth"` // 是否使用最大宽度
|
||||
KaTexMacros string `json:"katexMacros"` // KeTex 宏定义
|
||||
ReadOnly bool `json:"readOnly"` // 只读模式
|
||||
EmbedBlockBreadcrumb bool `json:"embedBlockBreadcrumb"` // 嵌入块是否显示面包屑
|
||||
ListLogicalOutdent bool `json:"listLogicalOutdent"` // 列表逻辑反向缩进
|
||||
ListItemDotNumberClickFocus bool `json:"listItemDotNumberClickFocus"` // 单击列表项标记聚焦
|
||||
FloatWindowMode int `json:"floatWindowMode"` // 浮窗触发模式,0:光标悬停,1:按住 Ctrl 悬停,2:不触发浮窗
|
||||
DynamicLoadBlocks int `json:"dynamicLoadBlocks"` // 块动态数,可配置区间 [48, 1024]
|
||||
Justify bool `json:"justify"` // 是否两端对齐
|
||||
RTL bool `json:"rtl"` // 是否从右到左显示
|
||||
Spellcheck bool `json:"spellcheck"` // 是否启用拼写检查
|
||||
OnlySearchForDoc bool `json:"onlySearchForDoc"` // 是否启用 [[ 仅搜索文档块
|
||||
BacklinkExpandCount int `json:"backlinkExpandCount"` // 反向链接默认展开数量
|
||||
BackmentionExpandCount int `json:"backmentionExpandCount"` // 反链提及默认展开数量
|
||||
FontSize int `json:"fontSize"` // 字体大小
|
||||
FontSizeScrollZoom bool `json:"fontSizeScrollZoom"` // 字体大小是否支持滚轮缩放
|
||||
FontFamily string `json:"fontFamily"` // 字体
|
||||
CodeSyntaxHighlightLineNum bool `json:"codeSyntaxHighlightLineNum"` // 代码块是否显示行号
|
||||
CodeTabSpaces int `json:"codeTabSpaces"` // 代码块中 Tab 转换空格数,配置为 0 则表示不转换
|
||||
CodeLineWrap bool `json:"codeLineWrap"` // 代码块是否自动折行
|
||||
CodeLigatures bool `json:"codeLigatures"` // 代码块是否连字
|
||||
DisplayBookmarkIcon bool `json:"displayBookmarkIcon"` // 是否显示书签图标
|
||||
DisplayNetImgMark bool `json:"displayNetImgMark"` // 是否显示网络图片角标
|
||||
GenerateHistoryInterval int `json:"generateHistoryInterval"` // 生成历史时间间隔,单位:分钟
|
||||
HistoryRetentionDays int `json:"historyRetentionDays"` // 历史保留天数
|
||||
Emoji []string `json:"emoji"` // 常用表情
|
||||
VirtualBlockRef bool `json:"virtualBlockRef"` // 是否启用虚拟引用
|
||||
VirtualBlockRefExclude string `json:"virtualBlockRefExclude"` // 虚拟引用关键字排除列表
|
||||
VirtualBlockRefInclude string `json:"virtualBlockRefInclude"` // 虚拟引用关键字包含列表
|
||||
BlockRefDynamicAnchorTextMaxLen int `json:"blockRefDynamicAnchorTextMaxLen"` // 块引动态锚文本最大长度
|
||||
PlantUMLServePath string `json:"plantUMLServePath"` // PlantUML 伺服地址
|
||||
FullWidth bool `json:"fullWidth"` // 是否使用最大宽度
|
||||
KaTexMacros string `json:"katexMacros"` // KeTex 宏定义
|
||||
ReadOnly bool `json:"readOnly"` // 只读模式
|
||||
EmbedBlockBreadcrumb bool `json:"embedBlockBreadcrumb"` // 嵌入块是否显示面包屑
|
||||
ListLogicalOutdent bool `json:"listLogicalOutdent"` // 列表逻辑反向缩进
|
||||
ListItemDotNumberClickFocus bool `json:"listItemDotNumberClickFocus"` // 单击列表项标记聚焦
|
||||
FloatWindowMode int `json:"floatWindowMode"` // 浮窗触发模式,0:光标悬停,1:按住 Ctrl 悬停,2:不触发浮窗
|
||||
DynamicLoadBlocks int `json:"dynamicLoadBlocks"` // 块动态数,可配置区间 [48, 1024]
|
||||
Justify bool `json:"justify"` // 是否两端对齐
|
||||
RTL bool `json:"rtl"` // 是否从右到左显示
|
||||
Spellcheck bool `json:"spellcheck"` // 是否启用拼写检查
|
||||
OnlySearchForDoc bool `json:"onlySearchForDoc"` // 是否启用 [[ 仅搜索文档块
|
||||
BacklinkExpandCount int `json:"backlinkExpandCount"` // 反向链接默认展开数量
|
||||
BackmentionExpandCount int `json:"backmentionExpandCount"` // 反链提及默认展开数量
|
||||
Markdown *util.Markdown `json:"markdown"` // Markdown 配置
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
@ -83,5 +86,6 @@ func NewEditor() *Editor {
|
|||
RTL: false,
|
||||
BacklinkExpandCount: 8,
|
||||
BackmentionExpandCount: 8,
|
||||
Markdown: util.MarkdownSettings,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue