feat: init commit
This commit is contained in:
commit
ebc566fc9d
9 changed files with 1203 additions and 0 deletions
14
web/index.js
Normal file
14
web/index.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
var height = document.body.clientHeight- 110;
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("codeInput"), {
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
mode: "javascript"
|
||||
});
|
||||
editor.setSize("100%", height);
|
||||
|
||||
function run() {
|
||||
var option = editor.getValue();
|
||||
axios.post("/", JSON.parse(option)).then(function(resp) {
|
||||
document.getElementById("svg").innerHTML = resp;
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue