Keybindings

Keybindings are enabled by default, but can be disabled like so: keybindings: false.


Available keybindings:

  • Tab: inserts 4 spaces at the cursor position
  • Ctrl/Cmd + P: Opens the print dialog
  • Ctrl/Cmd + B: Makes highlighted text bold
  • Ctrl/Cmd + I: Makes highlighted text italic
  • Ctrl/Cmd + A: Highlight everything
  • Ctrl/Cmd + C: Copy highlighted text
  • Ctrl/Cmd + X: Cut highlighted text
  • Ctrl/Cmd + V: Paste from clipboard
  • Ctrl/Cmd + Z: Undo
  • Shift + Ctrl/Cmd + Z: Redo
  • Ctrl/Cmd + 7: Align Left
  • Ctrl/Cmd + 8: Align Center
  • Ctrl/Cmd + 9: Align Right
  • Shift + Ctrl/Cmd + 9: Indent
  • Shift + Ctrl/Cmd + 7: Outdent
  • Shift + Ctrl/Cmd + C: Open "Change Color" dialog
  • Ctrl/Cmd + L: Open "Insert Link" dialog
  • Ctrl/Cmd + H: Show HTML
  • Ctrl/Cmd + S: Strikethrough
  • Ctrl/Cmd + L: Open "Insert Link" dialog
  • Ctrl/Cmd + 0: Body Text
  • Shift + Ctrl/Cmd + B: Blockquote
  • Ctrl/Cmd + 1: Header 1
  • Ctrl/Cmd + 2: Header 2
  • Ctrl/Cmd + 3: Header 3
  • Ctrl/Cmd + .: Unordered List
  • Ctrl/Cmd + ,: Ordered List
  • Shift + Enter: New line
  • Ctrl/Cmd + Enter: Enter/Exit Fullscreen
  • Ctrl/Cmd + O: Show Text Content

Example:


                    

                    
<!-- Include the MUDS stylesheet -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/muds-editor@1.6.0/muds.min.css">

<!-- Create the editor container -->
<textarea id="editor"></textarea>

<!-- Include the MUDS library -->
<script src="https://cdn.jsdelivr.net/npm/muds-editor@1.6.0/muds.min.js"></script>

<!-- Initialize MUDS editor -->
<script>
var muds = new muds({
    selector: 'editor',
    keybindings: false
});
</script>