Theme Inspinia
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 1.8KB

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