Add multi-language syntax highlighting to source editor, improve copy button to copy raw file content, and add permission error handling to file API endpoint
This commit is contained in:
+12
-1
@@ -26,6 +26,17 @@
|
||||
import { searchKeymap, highlightSelectionMatches } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { autocompletion, completionKeymap, closeBrackets, closeBracketsKeymap } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { markdown } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { python } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { javascript } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { html } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { css } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { json } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { xml } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { sql } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { php } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { cpp } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { java } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { rust } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
import { oneDark } from "https://esm.sh/@codemirror/[email protected]?external=@codemirror/state";
|
||||
|
||||
const basicSetup = [
|
||||
@@ -56,7 +67,7 @@
|
||||
])
|
||||
];
|
||||
|
||||
window.CodeMirror = { EditorView, EditorState, basicSetup, markdown, oneDark, keymap };
|
||||
window.CodeMirror = { EditorView, EditorState, basicSetup, markdown, python, javascript, html, css, json, xml, sql, php, cpp, java, rust, oneDark, keymap };
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user