all repos — NoPaste @ 29b774f090102303e43cf939b38ac2083e62d9f1

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/toml/index.html (view raw)

 1<!doctype html>
 2
 3<title>CodeMirror: TOML Mode</title>
 4<meta charset="utf-8"/>
 5<link rel=stylesheet href="../../doc/docs.css">
 6
 7<link rel="stylesheet" href="../../lib/codemirror.css">
 8<script src="../../lib/codemirror.js"></script>
 9<script src="toml.js"></script>
10<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
11<div id=nav>
12  <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
13
14  <ul>
15    <li><a href="../../index.html">Home</a>
16    <li><a href="../../doc/manual.html">Manual</a>
17    <li><a href="https://github.com/codemirror/codemirror">Code</a>
18  </ul>
19  <ul>
20    <li><a href="../index.html">Language modes</a>
21    <li><a class=active href="#">TOML Mode</a>
22  </ul>
23</div>
24
25<article>
26<h2>TOML Mode</h2>
27<form><textarea id="code" name="code">
28# This is a TOML document. Boom.
29
30title = "TOML Example"
31
32[owner]
33name = "Tom Preston-Werner"
34organization = "GitHub"
35bio = "GitHub Cofounder &amp; CEO\nLikes tater tots and beer."
36dob = 1979-05-27T07:32:00Z # First class dates? Why not?
37
38[database]
39server = "192.168.1.1"
40ports = [ 8001, 8001, 8002 ]
41connection_max = 5000
42enabled = true
43
44[servers]
45
46  # You can indent as you please. Tabs or spaces. TOML don't care.
47  [servers.alpha]
48  ip = "10.0.0.1"
49  dc = "eqdc10"
50  
51  [servers.beta]
52  ip = "10.0.0.2"
53  dc = "eqdc10"
54  
55[clients]
56data = [ ["gamma", "delta"], [1, 2] ]
57
58# Line breaks are OK when inside arrays
59hosts = [
60  "alpha",
61  "omega"
62]
63</textarea></form>
64    <script>
65      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
66        mode: {name: "toml"},
67        lineNumbers: true
68      });
69    </script>
70    <h3>The TOML Mode</h3>
71      <p> Created by Forbes Lindesay.</p>
72    <p><strong>MIME type defined:</strong> <code>text/x-toml</code>.</p>
73  </article>