2021-10-19 09:28:38 +00:00
|
|
|
{{define "components/editor"}}
|
2021-10-19 10:33:49 +00:00
|
|
|
<section class="section">
|
|
|
|
<container class="container is-max-desktop">
|
|
|
|
<div id="editor">{{.Content}}</div>
|
|
|
|
</container>
|
|
|
|
</section>
|
2021-10-19 15:41:09 +00:00
|
|
|
<script>
|
|
|
|
function setEditor(){
|
|
|
|
var editor = ace.edit("editor");
|
|
|
|
editor.setTheme("ace/theme/monokai");
|
|
|
|
editor.session.setMode("ace/mode/json");
|
|
|
|
editor.setReadOnly(true);
|
|
|
|
}
|
|
|
|
</script>
|
2021-10-19 09:28:38 +00:00
|
|
|
{{end}}
|