Kanka Custom Keyboard Shortcuts for Summernote

Set your own keyboard shortcuts for the Summernote editor on Kanka.

Version vom 09.12.2021. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Kanka Custom Keyboard Shortcuts for Summernote
// @namespace    http://tampermonkey.net/
// @version      1
// @description  Set your own keyboard shortcuts for the Summernote editor on Kanka.
// @author       Salvatos
// @match        https://kanka.io/*
// @match        https://marketplace.kanka.io/*
// @icon         https://www.google.com/s2/favicons?domain=kanka.io
// @run-at       document-end
// ==/UserScript==

$('#entry').summernote({
    keyMap: {
        pc: {
            'ENTER': 'insertParagraph',
            'CTRL+Z': 'undo',
            'CTRL+Y': 'redo',
            'TAB': 'tab',
            'SHIFT+TAB': 'untab',
            'CTRL+B': 'bold',
            'CTRL+I': 'italic',
            'CTRL+U': 'underline',
            'CTRL+SHIFT+S': 'strikethrough',
            'CTRL+BACKSLASH': 'removeFormat',
            'CTRL+SHIFT+L': 'justifyLeft',
            'CTRL+SHIFT+E': 'justifyCenter',
            'CTRL+SHIFT+R': 'justifyRight',
            'CTRL+SHIFT+J': 'justifyFull',
            'CTRL+SHIFT+NUM7': 'insertUnorderedList',
            'CTRL+SHIFT+NUM8': 'insertOrderedList',
            'CTRL+LEFTBRACKET': 'outdent',
            'CTRL+RIGHTBRACKET': 'indent',
            'CTRL+NUM0': 'formatPara',
            'CTRL+NUM1': 'formatH1',
            'CTRL+NUM2': 'formatH2',
            'CTRL+NUM3': 'formatH3',
            'CTRL+NUM4': 'formatH4',
            'CTRL+NUM5': 'formatH5',
            'CTRL+NUM6': 'formatH6',
            'CTRL+ENTER': 'insertHorizontalRule',
            'CTRL+K': 'showLinkDialog'
        },
        mac: {
            'ENTER': 'insertParagraph',
            'CMD+Z': 'undo',
            'CMD+SHIFT+Z': 'redo',
            'TAB': 'tab',
            'SHIFT+TAB': 'untab',
            'CMD+B': 'bold',
            'CMD+I': 'italic',
            'CMD+U': 'underline',
            'CMD+SHIFT+S': 'strikethrough',
            'CMD+BACKSLASH': 'removeFormat',
            'CMD+SHIFT+L': 'justifyLeft',
            'CMD+SHIFT+E': 'justifyCenter',
            'CMD+SHIFT+R': 'justifyRight',
            'CMD+SHIFT+J': 'justifyFull',
            'CMD+SHIFT+NUM7': 'insertUnorderedList',
            'CMD+SHIFT+NUM8': 'insertOrderedList',
            'CMD+LEFTBRACKET': 'outdent',
            'CMD+RIGHTBRACKET': 'indent',
            'CMD+NUM0': 'formatPara',
            'CMD+NUM1': 'formatH1',
            'CMD+NUM2': 'formatH2',
            'CMD+NUM3': 'formatH3',
            'CMD+NUM4': 'formatH4',
            'CMD+NUM5': 'formatH5',
            'CMD+NUM6': 'formatH6',
            'CMD+ENTER': 'insertHorizontalRule',
            'CMD+K': 'showLinkDialog'
        }
    }
});