xdan / jodit

Jodit - Best WYSIWYG Editor for You
https://xdsoft.net/jodit/
MIT License
1.71k stars 354 forks source link

removeFormat, insertOrderedList and insertUnorderedList hotkeys do not work #1079

Open trymeouteh opened 9 months ago

trymeouteh commented 9 months ago

Jodit Version: 4.0

Browser: FF & Chrome OS: Linux Is React App: False

Code

<link rel="stylesheet" href="node_modules/jodit/es2021/jodit.min.css">

<textarea id="myEditor"></textarea>

<script src="node_modules/jodit/es2021/jodit.min.js"></script>

<script>
    Jodit.make('#myEditor', {
        hotkeys: {
            redo: 'ctrl+z',
            undo: 'ctrl+y',
            indent: 'ctrl+]',
            outdent: 'ctrl+[',
            bold: 'ctrl+b',
            italic: 'ctrl+i',
            underline: 'ctrl-u',
            removeFormat: 'ctrl+shift+m',
            insertOrderedList: 'ctrl+shift+7',
            insertUnorderedList: 'ctrl+shift+8',
            openSearchDialog: 'ctrl+f',
            openReplaceDialog: 'ctrl+h',
        }
    });
</script>

Expected behavior: Remove format, insert ordered list and insert unordered list hotkeys will work as intended

Actual behavior: Remove format, insert ordered list and insert unordered list hotkeys do not work, even when I try changing hotkey commands and browsers.

xdan commented 6 months ago

Hi, Use commandToHotkeys instead https://xdsoft.net/jodit/docs/modules/plugins_hotkeys.html#root