Sha256: 488a1dcd0550eb46dc08aafef922a85233feaeb3bc04f42b2e7e7e02c107adf2

Contents?: true

Size: 1.64 KB

Versions: 46

Compression:

Stored size: 1.64 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="../lib/util/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#util_multiplex">manual</a> and
    the <a href="../lib/util/multiplex.js">source</a> for more
    information.</p>

  </body>
</html>

Version data entries

46 entries across 23 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby public/rearview/vendor/codemirror/demo/multiplex.html
rearview-1.2.3-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.2.2.rc.2-jruby public/rearview/vendor/codemirror/demo/multiplex.html
rearview-1.2.2.rc.2-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.2.2.rc.1-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.2.2.rc.1-jruby public/rearview/vendor/codemirror/demo/multiplex.html
rearview-1.2.1-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.2.1-jruby public/rearview/vendor/codemirror/demo/multiplex.html
rearview-1.2.0-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.2.0-jruby public/rearview/vendor/codemirror/demo/multiplex.html
rearview-1.1.2-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.1.2-jruby public/rearview/vendor/codemirror/demo/multiplex.html
rearview-1.1.1-jruby public/rearview/vendor/codemirror/demo/multiplex.html
rearview-1.1.1-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.1.0-jruby public/rearview/vendor/codemirror/demo/multiplex.html
rearview-1.1.0-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.0.3.rc.4-jruby public/rearview/vendor/codemirror/demo/multiplex.html
rearview-1.0.3.rc.4-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.0.3.rc.3-jruby public/rearview-src/vendor/codemirror/demo/multiplex.html
rearview-1.0.3.rc.3-jruby public/rearview/vendor/codemirror/demo/multiplex.html