ability to define a keyboard shortcut for paste markdown, closes #761

This commit is contained in:
zadam
2019-12-10 23:04:18 +01:00
parent 45c5287d53
commit a82066d899
8 changed files with 112 additions and 1 deletions

View File

@@ -132,6 +132,12 @@ function registerEntrypoints() {
$("#open-dev-tools-button").toggle(utils.isElectron());
keyboardActionService.setGlobalActionHandler("PasteMarkdownIntoText", async () => {
const dialog = await import("../dialogs/markdown_import.js");
dialog.importMarkdownInline();
});
if (utils.isElectron()) {
const openDevTools = () => {
require('electron').remote.getCurrentWindow().toggleDevTools();