mirror of
https://github.com/marktext/marktext.git
synced 2025-05-05 04:41:57 +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',
|
description: 'File: Print current Tab',
|
||||||
execute: async () => {
|
execute: async () => {
|
||||||
await delay(50)
|
await delay(50)
|
||||||
ipcRenderer.emit('mt::show-export-dialog', null, 'print')
|
bus.$emit('showExportDialog', 'print')
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
id: 'file.close-tab',
|
id: 'file.close-tab',
|
||||||
@ -125,14 +125,14 @@ const commands = [
|
|||||||
description: 'HTML',
|
description: 'HTML',
|
||||||
execute: async () => {
|
execute: async () => {
|
||||||
await delay(50)
|
await delay(50)
|
||||||
bus.$emit('export', 'styledHtml')
|
bus.$emit('showExportDialog', 'styledHtml')
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
id: 'file.export-file-pdf',
|
id: 'file.export-file-pdf',
|
||||||
description: 'PDF',
|
description: 'PDF',
|
||||||
execute: async () => {
|
execute: async () => {
|
||||||
await delay(50)
|
await delay(50)
|
||||||
bus.$emit('export', 'pdf')
|
bus.$emit('showExportDialog', 'pdf')
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
@ -144,13 +144,17 @@ const commands = [
|
|||||||
id: 'edit.undo',
|
id: 'edit.undo',
|
||||||
description: 'Edit: Undo',
|
description: 'Edit: Undo',
|
||||||
execute: async () => {
|
execute: async () => {
|
||||||
bus.$emit('undo', 'undo')
|
focusEditorAndExecute(
|
||||||
|
() => bus.$emit('undo', 'undo')
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
id: 'edit.redo',
|
id: 'edit.redo',
|
||||||
description: 'Edit: Redo',
|
description: 'Edit: Redo',
|
||||||
execute: async () => {
|
execute: async () => {
|
||||||
bus.$emit('redo', 'redo')
|
focusEditorAndExecute(
|
||||||
|
() => bus.$emit('redo', 'redo')
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
id: 'edit.duplicate',
|
id: 'edit.duplicate',
|
||||||
@ -616,13 +620,17 @@ const commands = [
|
|||||||
id: 'view.typewriter-mode',
|
id: 'view.typewriter-mode',
|
||||||
description: 'View: Toggle Typewriter Mode',
|
description: 'View: Toggle Typewriter Mode',
|
||||||
execute: async () => {
|
execute: async () => {
|
||||||
bus.$emit('view:toggle-view-entry', 'typewriter')
|
focusEditorAndExecute(
|
||||||
|
() => bus.$emit('view:toggle-view-entry', 'typewriter')
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
id: 'view.focus-mode',
|
id: 'view.focus-mode',
|
||||||
description: 'View: Focus Mode',
|
description: 'View: Focus Mode',
|
||||||
execute: async () => {
|
execute: async () => {
|
||||||
bus.$emit('view:toggle-view-entry', 'focus')
|
focusEditorAndExecute(
|
||||||
|
() => bus.$emit('view:toggle-view-entry', 'focus')
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
id: 'view.toggle-sidebar',
|
id: 'view.toggle-sidebar',
|
||||||
|
Loading…
Reference in New Issue
Block a user