Sha256: 2a5860eb5f590a915e33724a4af2e5790dd4a2ae34d2c36ab245e8700ec3672f

Contents?: true

Size: 1.65 KB

Versions: 6

Compression:

Stored size: 1.65 KB

Contents

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>CodeMirror: Multiplexing Parser Demo</title>
    <link rel="stylesheet" href="../lib/codemirror.css">
    <script src="../lib/codemirror.js"></script>
    <script src="../addon/mode/multiplex.js"></script>
    <script src="../mode/xml/xml.js"></script>
    <link rel="stylesheet" href="../doc/docs.css">

    <style type="text/css">
      .CodeMirror {border: 1px solid black;}
      .cm-delimit {color: #fa4;}
    </style>
  </head>
  <body>
    <h1>CodeMirror: Multiplexing Parser Demo</h1>

    <form><textarea id="code" name="code">
<html>
  <body style="<<magic>>">
    <h1><< this is not <html >></h1>
    <<
        multiline
        not html
        at all : &amp;amp; <link/>
    >>
    <p>this is html again</p>
  </body>
</html>
</textarea></form>

    <script>
CodeMirror.defineMode("demo", function(config) {
  return CodeMirror.multiplexingMode(
    CodeMirror.getMode(config, "text/html"),
    {open: "<<", close: ">>",
     mode: CodeMirror.getMode(config, "text/plain"),
     delimStyle: "delimit"}
    // .. more multiplexed styles can follow here
  );
});
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  mode: "demo",
  lineNumbers: true,
  lineWrapping: true
});
</script>

    <p>Demonstration of a multiplexing mode, which, at certain
    boundary strings, switches to one or more inner modes. The out
    (HTML) mode does not get fed the content of the <code>&lt;&lt;
    >></code> blocks. See
    the <a href="../doc/manual.html#addon_multiplex">manual</a> and
    the <a href="../addon/mode/multiplex.js">source</a> for more
    information.</p>

  </body>
</html>

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
mdbe-0.1.0 public/libs/codemirror/demo/multiplex.html
maglev-database-explorer-0.0.5 public/libs/codemirror/demo/multiplex.html
maglev-database-explorer-0.0.4 public/libs/codemirror/demo/multiplex.html
maglev-database-explorer-0.0.3 public/libs/codemirror/demo/multiplex.html
maglev-database-explorer-0.0.2 public/libs/codemirror/demo/multiplex.html
maglev-database-explorer-0.0.1 public/libs/codemirror/demo/multiplex.html