summaryrefslogtreecommitdiff
path: root/codemirror_ui/lib/CodeMirror-2.3/demo/marker.html
diff options
context:
space:
mode:
Diffstat (limited to 'codemirror_ui/lib/CodeMirror-2.3/demo/marker.html')
-rw-r--r--codemirror_ui/lib/CodeMirror-2.3/demo/marker.html52
1 files changed, 52 insertions, 0 deletions
diff --git a/codemirror_ui/lib/CodeMirror-2.3/demo/marker.html b/codemirror_ui/lib/CodeMirror-2.3/demo/marker.html
new file mode 100644
index 0000000..00a89ce
--- /dev/null
+++ b/codemirror_ui/lib/CodeMirror-2.3/demo/marker.html
@@ -0,0 +1,52 @@
+<!doctype html>
+<html>
+ <head>
+ <title>CodeMirror: Breakpoint Demo</title>
+ <link rel="stylesheet" href="../lib/codemirror.css">
+ <script src="../lib/codemirror.js"></script>
+ <script src="../mode/javascript/javascript.js"></script>
+ <link rel="stylesheet" href="../doc/docs.css">
+
+ <style type="text/css">
+ .CodeMirror-gutter {
+ width: 3em;
+ background: white;
+ }
+ .CodeMirror {
+ border: 1px solid #aaa;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>CodeMirror: Breakpoint demo</h1>
+
+ <form><textarea id="code" name="code">
+CodeMirror.fromTextArea(document.getElementById("code"), {
+ lineNumbers: true,
+ onGutterClick: function(cm, n) {
+ var info = cm.lineInfo(n);
+ if (info.markerText)
+ cm.clearMarker(n);
+ else
+ cm.setMarker(n, "<span style=\"color: #900\">●</span> %N%");
+ }
+});
+</textarea></form>
+
+<p>Click the line-number gutter to add or remove 'breakpoints'.</p>
+
+ <script>
+ CodeMirror.fromTextArea(document.getElementById("code"), {
+ lineNumbers: true,
+ onGutterClick: function(cm, n) {
+ var info = cm.lineInfo(n);
+ if (info.markerText)
+ cm.clearMarker(n);
+ else
+ cm.setMarker(n, "<span style=\"color: #900\">●</span> %N%");
+ }
+ });
+ </script>
+
+ </body>
+</html>