Sha256: 87e78ff963a6ebf7995e1bd6add177b9f2a5f07e80f63ee9a08a1db6f8f7f801

Contents?: true

Size: 1.46 KB

Versions: 1

Compression:

Stored size: 1.46 KB

Contents

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Test Ace</title>

    <script src="../app/web/lib/ace/ace.js" type="text/javascript" charset="utf-8"></script>
    <script src="../app/web/lib/ace/mode-json.js" type="text/javascript" charset="utf-8"></script>
    <script src="../app/web/lib/ace/theme-textmate.js" type="text/javascript" charset="utf-8"></script>
    <script src="../app/web/lib/ace/theme-jso.js" type="text/javascript" charset="utf-8"></script>

    <style type="text/css" media="screen">
        html, body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }

        #editor {
            border: 1px solid gray;
            width: 50%;
            height: 75%;
        }
    </style>
</head>
<body>

<h1>Test Ace</h1>

<div id="editor"></div>

<script>
    var editor = ace.edit('editor');
    editor.setTheme("ace/theme/jso");
    editor.setShowPrintMargin(false);
    editor.setFontSize(13);
    editor.getSession().setMode('ace/mode/json');
    editor.getSession().setUseSoftTabs(true);
    editor.getSession().setUseWrapMode(true);

    var json = {
            "array": [
            1,
            2,
            3
        ],
        "boolean": true,
        "null": null,
        "number": 123,
        "object": {
            "a": "b",
            "c": "d",
            "e": "f"
        },
        "string": "Hello World"
    };
    editor.setValue(JSON.stringify(json, null, 4), -1);
</script>
</body>
</html>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bee_api-0.0.5 vendor/test/test_ace.html