✨ Added code block export image extension
This commit is contained in:
@@ -27,6 +27,7 @@ const (
|
||||
ContextMenu ExtensionName = "contextMenu" // 上下文菜单
|
||||
Search ExtensionName = "search" // 搜索功能
|
||||
HttpClient ExtensionName = "httpClient" // HTTP 客户端
|
||||
BlockImage ExtensionName = "blockImage" // 代码块导出图片
|
||||
)
|
||||
|
||||
// NewDefaultExtensions 创建默认扩展配置
|
||||
@@ -106,5 +107,10 @@ func NewDefaultExtensions() []Extension {
|
||||
Enabled: true,
|
||||
Config: ExtensionConfig{},
|
||||
},
|
||||
{
|
||||
Name: BlockImage,
|
||||
Enabled: true,
|
||||
Config: ExtensionConfig{},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ const (
|
||||
HistoryRedo KeyBindingName = "historyRedo" // 重做
|
||||
HistoryUndoSelection KeyBindingName = "historyUndoSelection" // 撤销选择
|
||||
HistoryRedoSelection KeyBindingName = "historyRedoSelection" // 重做选择
|
||||
CopyBlockImage KeyBindingName = "copyBlockImage" // 复制块为图片
|
||||
)
|
||||
|
||||
const defaultExtension = "editor"
|
||||
@@ -282,6 +283,14 @@ func NewDefaultKeyBindings() []KeyBinding {
|
||||
Enabled: true,
|
||||
PreventDefault: true,
|
||||
},
|
||||
{
|
||||
Name: CopyBlockImage,
|
||||
Type: Standard,
|
||||
Key: "Mod-Shift-Alt-C",
|
||||
Extension: BlockImage,
|
||||
Enabled: true,
|
||||
PreventDefault: true,
|
||||
},
|
||||
|
||||
// 代码折叠相关
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user