add codemirror test page

This commit is contained in:
2023-09-27 17:58:38 +08:00
parent e163119bb6
commit 3e7fe5c4de
10 changed files with 10808 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="../static/lib/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="../static/lib/codemirror/theme/base16.css">
<script src="../static/lib/codemirror/lib/codemirror.js"></script>
<script src="../static/lib/codemirror/mode/properties/properties.js"></script>
</head>
<body>
<textarea id="code" name="code"></textarea>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
mode: 'text/x-ini',
theme: 'base16'
});
editor.setValue(`
[HTTP:aaa.bbb.com]
a = 1
b = 2
`)
console.log(editor.getValue());
</script>
</body>
</html>