docs.html 794 Bytes
Newer Older
nachtgold's avatar
nachtgold committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{% extends 'base.html' %}

{% block content %}

<div class="docs-title">Documentation</div>

<div class="editor">function foo(items) {
    var x = "All this is syntax highlighted";
    return x;
}</div>

<div class="editor">function foo(items) {
    var x = "All this is syntax highlighted";
    return x;
}</div>


<script src="/static/core/ace/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
    var editors = document.getElementsByClassName("editor");
    for(var element of editors) {
        console.log(element);
        var editor = ace.edit(element);
        editor.setTheme("ace/theme/twilight");
        editor.session.setMode("ace/mode/lua");
        editor.setShowPrintMargin(false);
        editor.setReadOnly(true);
    }
</script>

{% endblock %}