unversioning not used extension in codemirror

This commit is contained in:
Erik Amaru Ortiz
2011-01-20 22:51:21 +00:00
parent 74ed2feafc
commit a048964238
6 changed files with 0 additions and 1168 deletions

View File

@@ -1,74 +0,0 @@
<!doctype html>
<html>
<head>
<title>CodeMirror 2</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="mode/javascript/javascript.css">
</head>
<body>
<h1>CodeMirror 2</h1>
<p>This is a new project, aiming to create a CodeMirror-style
component without using an IFRAME.
The <a href="http://ajaxorg.github.com/ace/">ACE</a> editor proved
that this is viable, which motivated me to give it a shot. (Though I took a somewhat different
approach.)</p>
<p>No IE support so far, only tested with recent Chrome, Opera,
and Firefox builds. The JavaScript parser is the only one I've
ported over.</p>
<p>Code at <a href="https://github.com/marijnh/codemirror2">https://github.com/marijnh/codemirror2</a>.</p>
<form><textarea id="code" style="display: none" name="code">
// Demo code (the actual new parser character stream implementation)
function StringStream(string) {
this.pos = 0;
this.string = string;
}
StringStream.prototype = {
done: function() {return this.pos >= this.string.length;},
peek: function() {return this.string.charAt(this.pos);},
next: function() {
if (this.pos &lt; this.string.length)
return this.string.charAt(this.pos++);
},
eat: function(match) {
var ch = this.string.charAt(this.pos);
if (typeof match == "string") var ok = ch == match;
else var ok = ch &amp;&amp; match.test ? match.test(ch) : match(ch);
if (ok) {this.pos++; return ch;}
},
eatWhile: function(match) {
var start = this.pos;
while (this.eat(match));
if (this.pos > start) return this.string.slice(start, this.pos);
},
backUp: function(n) {this.pos -= n;},
column: function() {return this.pos;},
eatSpace: function() {
var start = this.pos;
while (/\s/.test(this.string.charAt(this.pos))) this.pos++;
return this.pos - start;
},
match: function(pattern, consume, caseInsensitive) {
if (typeof pattern == "string") {
function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
if (consume !== false) this.pos += str.length;
return true;
}
}
else {
var match = this.string.slice(this.pos).match(pattern);
if (match &amp;&amp; consume !== false) this.pos += match[0].length;
return match;
}
}
};
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
</script>
</body>
</html>

View File

@@ -1,4 +0,0 @@
* Mouse drag to copy a region in X
* Indentation
* Line numbers
* Horizontal scrolling

View File

@@ -1,41 +0,0 @@
.CodeMirror {
position: relative;
border: 1px solid black;
}
.CodeMirror-cursor {
width: 1px;
height: 1.2em !important;
background: black;
position: absolute;
margin-top: -.1em;
display: none;
}
.CodeMirror-focused .CodeMirror-cursor {
display: block;
}
.CodeMirror-code {
position: relative;
white-space: pre;
overflow: auto;
height: 300px;
font-family: monospace;
line-height: 1em;
padding: .4em;
}
.CodeMirror-code div {
height: 1em;
min-width: 1px;
}
span.CodeMirror-selected {
background: #bbb !important;
color: white !important;
}
.CodeMirror-focused .CodeMirror-selected {
background: #88f !important;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
span.js-punctuation {color: #666;}
span.js-operator {color: #666;}
span.js-keyword {color: #90b;}
span.js-atom {color: #281;}
span.js-variabledef {color: #00f;}
span.js-localvariable {color: #049;}
span.js-comment {color: #a70;}
span.js-string {color: #a22;}

File diff suppressed because it is too large Load Diff