mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-12-28 09:41:52 +00:00
49 lines
1.5 KiB
HTML
49 lines
1.5 KiB
HTML
<!doctype html>
|
|
|
|
<title>CodeMirror: Trailing Whitespace Demo</title>
|
|
<meta charset="utf-8"/>
|
|
<link rel=stylesheet href="../doc/docs.css">
|
|
|
|
<link rel="stylesheet" href="../lib/codemirror.css">
|
|
<script src="../lib/codemirror.js"></script>
|
|
<script src="../addon/edit/trailingspace.js"></script>
|
|
<style type="text/css">
|
|
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
|
.cm-trailingspace {
|
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);
|
|
background-position: bottom left;
|
|
background-repeat: repeat-x;
|
|
}
|
|
</style>
|
|
<div id=nav>
|
|
<a href="http://codemirror.net"><img id=logo src="../doc/logo.png"></a>
|
|
|
|
<ul>
|
|
<li><a href="../index.html">Home</a>
|
|
<li><a href="../doc/manual.html">Manual</a>
|
|
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
</ul>
|
|
<ul>
|
|
<li><a class=active href="#">Trailing Whitespace</a>
|
|
</ul>
|
|
</div>
|
|
|
|
<article>
|
|
<h2>Trailing Whitespace Demo</h2>
|
|
<form><textarea id="code" name="code">This text
|
|
has some
|
|
trailing whitespace!</textarea></form>
|
|
|
|
<script>
|
|
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
lineNumbers: true,
|
|
showTrailingSpace: true
|
|
});
|
|
</script>
|
|
|
|
<p>Uses
|
|
the <a href="../doc/manual.html#addon_trailingspace">trailingspace</a>
|
|
addon to highlight trailing whitespace.</p>
|
|
|
|
</article>
|