Sha256: a87c3cb8870fbec6bded70605a8c8b19d16fc68e2565543c0d17c5ec9af86388

Contents?: true

Size: 1.25 KB

Versions: 46

Compression:

Stored size: 1.25 KB

Contents

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>CodeMirror: Lazy Mode Loading Demo</title>
    <link rel="stylesheet" href="../lib/codemirror.css">
    <script src="../lib/codemirror.js"></script>
    <script src="../lib/util/loadmode.js"></script>
    <link rel="stylesheet" href="../doc/docs.css">

    <style type="text/css">
      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
    </style>
  </head>
  <body>
    <h1>CodeMirror: Lazy Mode Loading</h1>

    <form><textarea id="code" name="code">This is the editor.
// It starts out in plain text mode,
#  use the control below to load and apply a mode
  "you'll see the highlighting of" this text /*change*/.
</textarea></form>
<p><input type=text value=javascript id=mode> <button type=button onclick="change()">change mode</button></p>

    <script>
CodeMirror.modeURL = "../mode/%N/%N.js";
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  lineNumbers: true
});
var modeInput = document.getElementById("mode");
CodeMirror.connect(modeInput, "keypress", function(e) {
  if (e.keyCode == 13) change();
});
function change() {
   editor.setOption("mode", modeInput.value);
   CodeMirror.autoLoadMode(editor, modeInput.value);
}
</script>
  </body>
</html>

Version data entries

46 entries across 23 versions & 1 rubygems

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