mirror of
https://github.com/marktext/marktext.git
synced 2025-05-04 19:12:55 +08:00
Fix outdated export command (#1627)
* Fix outdated export command * Fix more commands by focusing editor
This commit is contained in:
parent
be35982985
commit
e78e4c6b10
@ -76,7 +76,7 @@ const commands = [
|
||||
description: 'File: Print current Tab',
|
||||
execute: async () => {
|
||||
await delay(50)
|
||||
ipcRenderer.emit('mt::show-export-dialog', null, 'print')
|
||||
bus.$emit('showExportDialog', 'print')
|
||||
}
|
||||
}, {
|
||||
id: 'file.close-tab',
|
||||
@ -125,14 +125,14 @@ const commands = [
|
||||
description: 'HTML',
|
||||
execute: async () => {
|
||||
await delay(50)
|
||||
bus.$emit('export', 'styledHtml')
|
||||
bus.$emit('showExportDialog', 'styledHtml')
|
||||
}
|
||||
}, {
|
||||
id: 'file.export-file-pdf',
|
||||
description: 'PDF',
|
||||
execute: async () => {
|
||||
await delay(50)
|
||||
bus.$emit('export', 'pdf')
|
||||
bus.$emit('showExportDialog', 'pdf')
|
||||
}
|
||||
}]
|
||||
},
|
||||
@ -144,13 +144,17 @@ const commands = [
|
||||
id: 'edit.undo',
|
||||
description: 'Edit: Undo',
|
||||
execute: async () => {
|
||||
bus.$emit('undo', 'undo')
|
||||
focusEditorAndExecute(
|
||||
() => bus.$emit('undo', 'undo')
|
||||
)
|
||||
}
|
||||
}, {
|
||||
id: 'edit.redo',
|
||||
description: 'Edit: Redo',
|
||||
execute: async () => {
|
||||
bus.$emit('redo', 'redo')
|
||||
focusEditorAndExecute(
|
||||
() => bus.$emit('redo', 'redo')
|
||||
)
|
||||
}
|
||||
}, {
|
||||
id: 'edit.duplicate',
|
||||
@ -616,13 +620,17 @@ const commands = [
|
||||
id: 'view.typewriter-mode',
|
||||
description: 'View: Toggle Typewriter Mode',
|
||||
execute: async () => {
|
||||
bus.$emit('view:toggle-view-entry', 'typewriter')
|
||||
focusEditorAndExecute(
|
||||
() => bus.$emit('view:toggle-view-entry', 'typewriter')
|
||||
)
|
||||
}
|
||||
}, {
|
||||
id: 'view.focus-mode',
|
||||
description: 'View: Focus Mode',
|
||||
execute: async () => {
|
||||
bus.$emit('view:toggle-view-entry', 'focus')
|
||||
focusEditorAndExecute(
|
||||
() => bus.$emit('view:toggle-view-entry', 'focus')
|
||||
)
|
||||
}
|
||||
}, {
|
||||
id: 'view.toggle-sidebar',
|
||||
|
Loading…
Reference in New Issue
Block a user