add tab indent

Hunter
Monday, July 7th, 2025 at 6:48 PM

index.html+4-4

index.html
  7      <script type="module">
  8          import {EditorView, keymap} from "https://esm.sh/@codemirror/view@6"
  9          import {EditorState} from "https://esm.sh/@codemirror/state@6"
    -        import {defaultKeymap} from "https://esm.sh/@codemirror/commands@6"
 10 +        import {defaultKeymap, indentWithTab} from "https://esm.sh/@codemirror/commands@6"
 11          import {html} from "https://esm.sh/@codemirror/lang-html@6"
 12          import {oneDark} from "https://esm.sh/@codemirror/theme-one-dark@6"
 13          
    -        window.CodeMirror = {EditorView, EditorState, keymap, defaultKeymap, html, oneDark};
 14 +        window.CodeMirror = {EditorView, EditorState, keymap, defaultKeymap, indentWithTab, html, oneDark};
 15      </script>
 16      <style>
 17          :root {

193                  return;
194              }
195  
    -            const {EditorView, EditorState, keymap, defaultKeymap, html, oneDark} = window.CodeMirror;
196 +            const {EditorView, EditorState, keymap, defaultKeymap, indentWithTab, html, oneDark} = window.CodeMirror;
197              
198              // Load saved content
199              const savedContent = loadFromStorage();

203                  state: EditorState.create({
204                      doc: savedContent,
205                      extensions: [
    -                        keymap.of(defaultKeymap),
206 +                        keymap.of([indentWithTab, ...defaultKeymap]),
207                          html(),
208                          oneDark,
209                          EditorView.updateListener.of((update) => {