From b79229ea8ba1b78b8e60370ba995d780fe3c5cd0 Mon Sep 17 00:00:00 2001 From: "michael.oliveira" Date: Sun, 28 Jan 2024 20:04:36 -0300 Subject: [PATCH] :bug: fix: reajustando o tamanho do textarea para o codemirror. --- index.html | 11 +++++++++-- js/editor.js | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 622b0c6..b305b59 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,13 @@ + + @@ -90,9 +97,8 @@
- - +
@@ -113,6 +119,7 @@ + diff --git a/js/editor.js b/js/editor.js index dd4484a..5455e4f 100644 --- a/js/editor.js +++ b/js/editor.js @@ -2,5 +2,27 @@ var editor = CodeMirror.fromTextArea(document.getElementById("axeetScript"), { lineNumbers: true, styleActiveLine: true, matchBrackets: true, + mode: "javascript", theme: "dracula" }); + +var place = '{\n' + + '"titleCheat": "Axeet",\n' + + '"theme": "axeet",\n' + + '"author": "Fulano",\n' + + '"cheatSheet": "Red Hat",\n' + + '"topic": {\n' + + ' "topicName": "Openshift",\n' + + ' "cheat": {\n' + + ' "codeCheat": "oc get ns",\n' + + ' "description": "pegando o name space"\n' + + ' },\n' + + ' {\n' + + ' "codeCheat": "oc select project [nome do projeto",\n' + + ' "entra dentro de um projeto no openshift"\n' + + ' }\n' + + ' }\n' + + '}'; + +var width = window.innerWidth; +editor.setSize(0.5*width, 0.5*width); \ No newline at end of file