Skip to content

Commit

Permalink
add missing demo file
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Feb 18, 2011
1 parent 334c692 commit bb64049
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
3 changes: 0 additions & 3 deletions demo/complete.html
Expand Up @@ -24,9 +24,6 @@
margin: 0;
font-family: monospace;
}
.completions select option {
padding: 0 4em;
}
.CodeMirror {
border: 1px solid #eee;
}
Expand Down
52 changes: 52 additions & 0 deletions demo/marker.html
@@ -0,0 +1,52 @@
<!doctype html>
<html>
<head>
<title>CodeMirror 2: Breakpoint Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
<link rel="stylesheet" href="../mode/javascript/javascript.css">
<script src="../mode/javascript/javascript.js"></script>

<style type="text/css">
.CodeMirror-gutter {
width: 3em;
background: white;
}
.CodeMirror {
border: 1px solid #aaa;
}
</style>
</head>
<body style="max-width: 70em; margin-left: 2em; font-family: tahoma, arial, sans-serif;">
<h1>CodeMirror 2: 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>

0 comments on commit bb64049

Please sign in to comment.