liquid_cms 0.2.0.11 → 0.2.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +7 -0
- data/TODO.rdoc +1 -1
- data/app/controllers/cms/main_controller.rb +3 -2
- data/app/helpers/cms/common_helper.rb +9 -2
- data/app/helpers/cms/components_helper.rb +10 -4
- data/app/models/cms/component.rb +4 -0
- data/app/views/cms/assets/_list.html.erb +4 -4
- data/app/views/cms/components/_list.html.erb +5 -1
- data/app/views/cms/pages/_list.html.erb +4 -4
- data/app/views/cms/shared/_sidebar.html.erb +32 -8
- data/app/views/layouts/cms.html.erb +5 -2
- data/generators/liquid_cms/templates/config/locales/cms/en.yml +3 -2
- data/generators/liquid_cms/templates/public/cms/codemirror/LICENSE +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/csscolors.css +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/docs.css +17 -3
- data/generators/liquid_cms/templates/public/cms/codemirror/css/font.js +15 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/jscolors.css +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/sparqlcolors.css +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/xmlcolors.css +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/codemirror.js +59 -26
- data/generators/liquid_cms/templates/public/cms/codemirror/js/editor.js +149 -71
- data/generators/liquid_cms/templates/public/cms/codemirror/js/highlight.js +2 -2
- data/generators/liquid_cms/templates/public/cms/codemirror/js/mirrorframe.js +2 -2
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsecss.js +5 -3
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsedummy.js +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsehtmlmixed.js +28 -9
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsejavascript.js +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsesparql.js +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsexml.js +6 -1
- data/generators/liquid_cms/templates/public/cms/codemirror/js/select.js +48 -21
- data/generators/liquid_cms/templates/public/cms/codemirror/js/stringstream.js +15 -1
- data/generators/liquid_cms/templates/public/cms/codemirror/js/tokenize.js +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/tokenizejavascript.js +1 -1
- data/generators/liquid_cms/templates/public/cms/codemirror/js/undo.js +17 -14
- data/generators/liquid_cms/templates/public/cms/codemirror/js/unittests.js +44 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/util.js +6 -3
- data/generators/liquid_cms/templates/public/cms/javascripts/cms.js +15 -1
- data/generators/liquid_cms/templates/public/cms/javascripts/livepipe.js +181 -0
- data/generators/liquid_cms/templates/public/cms/javascripts/tabs.js +149 -0
- data/generators/liquid_cms/templates/public/cms/stylesheets/ie9.css +4 -0
- data/generators/liquid_cms/templates/public/cms/stylesheets/sidebar.css +132 -0
- data/generators/liquid_cms/templates/public/cms/stylesheets/styles.css +1 -74
- data/generators/liquid_cms/templates/public/cms/stylesheets/themes/dark.css +2 -1
- data/lib/liquid_cms/context.rb +4 -0
- data/lib/liquid_cms/version.rb +1 -1
- data/liquid_cms.gemspec +1 -1
- data/test/functional/assets_controller_test.rb +3 -3
- data/test/rails_app/config/locales/cms/en.yml +8 -0
- metadata +11 -16
- data/generators/liquid_cms/templates/public/cms/codemirror/bigtest.html +0 -1296
- data/generators/liquid_cms/templates/public/cms/codemirror/css/people.jpg +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/csstest.html +0 -60
- data/generators/liquid_cms/templates/public/cms/codemirror/highlight.html +0 -82
- data/generators/liquid_cms/templates/public/cms/codemirror/htmltest.html +0 -52
- data/generators/liquid_cms/templates/public/cms/codemirror/index.html +0 -245
- data/generators/liquid_cms/templates/public/cms/codemirror/jstest.html +0 -56
- data/generators/liquid_cms/templates/public/cms/codemirror/manual.html +0 -759
- data/generators/liquid_cms/templates/public/cms/codemirror/mixedtest.html +0 -52
- data/generators/liquid_cms/templates/public/cms/codemirror/sparqltest.html +0 -41
- data/generators/liquid_cms/templates/public/cms/codemirror/story.html +0 -671
Binary file
|
@@ -1,60 +0,0 @@
|
|
1
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
-
<head>
|
3
|
-
<script src="js/codemirror.js" type="text/javascript"></script>
|
4
|
-
<title>CodeMirror: CSS demonstration</title>
|
5
|
-
<link rel="stylesheet" type="text/css" href="css/docs.css"/>
|
6
|
-
</head>
|
7
|
-
<body style="padding: 20px;">
|
8
|
-
|
9
|
-
<p>Demonstration of <a href="index.html">CodeMirror</a>'s CSS
|
10
|
-
highlighter.</p>
|
11
|
-
|
12
|
-
<div class="border">
|
13
|
-
<textarea id="code" cols="120" rows="30">
|
14
|
-
/* Some example CSS */
|
15
|
-
|
16
|
-
@import url("something.css");
|
17
|
-
|
18
|
-
body {
|
19
|
-
margin: 0;
|
20
|
-
padding: 3em 6em;
|
21
|
-
font-family: tahoma, arial, sans-serif;
|
22
|
-
color: #000;
|
23
|
-
}
|
24
|
-
|
25
|
-
#navigation a {
|
26
|
-
font-weight: bold;
|
27
|
-
text-decoration: none !important;
|
28
|
-
}
|
29
|
-
|
30
|
-
h1 {
|
31
|
-
font-size: 2.5em;
|
32
|
-
}
|
33
|
-
|
34
|
-
h2 {
|
35
|
-
font-size: 1.7em;
|
36
|
-
}
|
37
|
-
|
38
|
-
h1:before, h2:before {
|
39
|
-
content: "::";
|
40
|
-
}
|
41
|
-
|
42
|
-
code {
|
43
|
-
font-family: courier, monospace;
|
44
|
-
font-size: 80%;
|
45
|
-
color: #418A8A;
|
46
|
-
}
|
47
|
-
</textarea>
|
48
|
-
</div>
|
49
|
-
|
50
|
-
<script type="text/javascript">
|
51
|
-
var editor = CodeMirror.fromTextArea('code', {
|
52
|
-
height: "dynamic",
|
53
|
-
parserfile: "parsecss.js",
|
54
|
-
stylesheet: "css/csscolors.css",
|
55
|
-
path: "js/"
|
56
|
-
});
|
57
|
-
</script>
|
58
|
-
|
59
|
-
</body>
|
60
|
-
</html>
|
@@ -1,82 +0,0 @@
|
|
1
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
-
<head>
|
3
|
-
<script src="js/highlight.js" type="text/javascript"></script>
|
4
|
-
<script src="js/stringstream.js" type="text/javascript"></script>
|
5
|
-
<script src="js/tokenize.js" type="text/javascript"></script>
|
6
|
-
<script src="js/tokenizejavascript.js" type="text/javascript"></script>
|
7
|
-
<script src="js/parsejavascript.js" type="text/javascript"></script>
|
8
|
-
<title>CodeMirror: String highlight demonstration</title>
|
9
|
-
<link rel="stylesheet" type="text/css" href="css/jscolors.css"/>
|
10
|
-
</head>
|
11
|
-
<body style="padding: 20px;">
|
12
|
-
|
13
|
-
<div style="border: 1px solid black; padding: .4em;">
|
14
|
-
<textarea id="code" cols="120" rows="20" style="border-width: 0">
|
15
|
-
// Demo for running a CodeMirror parser over a piece of code without
|
16
|
-
// creating an actual editor.
|
17
|
-
|
18
|
-
(function(){
|
19
|
-
function normaliseString(string) {
|
20
|
-
var tab = "";
|
21
|
-
for (var i = 0; i < indentUnit; i++) tab += " ";
|
22
|
-
|
23
|
-
string = string.replace(/\t/g, tab).replace(/\u00a0/g, " ").replace(/\r\n?/g, "\n");
|
24
|
-
var pos = 0, parts = [], lines = string.split("\n");
|
25
|
-
for (var line = 0; line < lines.length; line++) {
|
26
|
-
if (line != 0) parts.push("\n");
|
27
|
-
parts.push(lines[line]);
|
28
|
-
}
|
29
|
-
|
30
|
-
return {
|
31
|
-
next: function() {
|
32
|
-
if (pos < parts.length) return parts[pos++];
|
33
|
-
else throw StopIteration;
|
34
|
-
}
|
35
|
-
};
|
36
|
-
}
|
37
|
-
|
38
|
-
window.highlightText = function(string, output, parser) {
|
39
|
-
var parser = (parser || Editor.Parser).make(stringStream(normaliseString(string)));
|
40
|
-
try {
|
41
|
-
while (true) {
|
42
|
-
var token = parser.next();
|
43
|
-
var span = document.createElement("SPAN");
|
44
|
-
span.className = token.style;
|
45
|
-
span.appendChild(document.createTextNode(token.value));
|
46
|
-
output.appendChild(span);
|
47
|
-
}
|
48
|
-
}
|
49
|
-
catch (e) {
|
50
|
-
if (e != StopIteration) throw e;
|
51
|
-
}
|
52
|
-
}
|
53
|
-
})();
|
54
|
-
</textarea>
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<button onclick="highlight()">Run highlighter</button>
|
58
|
-
|
59
|
-
<div>
|
60
|
-
<div id="numbers" style="float: left; width: 2em; margin-right: .5em; text-align: right; font-family: monospace; color: #CCC;"></div>
|
61
|
-
<pre id="output" style="font-family: monospace"></pre>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<script type="text/javascript">
|
65
|
-
// Simple hack to demonstrate adding line numbers. Just pass the DOM node as
|
66
|
-
// the second argument to highlightText when you don't need those
|
67
|
-
function highlight() {
|
68
|
-
var lineNo = 1, output = document.getElementById("output"), numbers = document.getElementById("numbers");
|
69
|
-
output.innerHTML = numbers.innerHTML = "";
|
70
|
-
|
71
|
-
function addLine(line) {
|
72
|
-
numbers.appendChild(document.createTextNode(String(lineNo++)));
|
73
|
-
numbers.appendChild(document.createElement("BR"));
|
74
|
-
for (var i = 0; i < line.length; i++) output.appendChild(line[i]);
|
75
|
-
output.appendChild(document.createElement("BR"));
|
76
|
-
}
|
77
|
-
highlightText(document.getElementById("code").value, addLine);
|
78
|
-
}
|
79
|
-
</script>
|
80
|
-
|
81
|
-
</body>
|
82
|
-
</html>
|
@@ -1,52 +0,0 @@
|
|
1
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
-
<head>
|
3
|
-
<script src="js/codemirror.js" type="text/javascript"></script>
|
4
|
-
<title>CodeMirror: HTML/XML demonstration</title>
|
5
|
-
<link rel="stylesheet" type="text/css" href="css/docs.css"/>
|
6
|
-
<style type="text/css">
|
7
|
-
.CodeMirror-line-numbers {
|
8
|
-
width: 2.2em;
|
9
|
-
color: #aaa;
|
10
|
-
background-color: #eee;
|
11
|
-
text-align: right;
|
12
|
-
padding-right: .3em;
|
13
|
-
font-size: 10pt;
|
14
|
-
font-family: monospace;
|
15
|
-
padding-top: .4em;
|
16
|
-
}
|
17
|
-
</style>
|
18
|
-
</head>
|
19
|
-
<body style="padding: 20px;">
|
20
|
-
|
21
|
-
<p>This is a simple demonstration of the XML/HTML indentation module
|
22
|
-
for <a href="index.html">CodeMirror</a>. The <a
|
23
|
-
href="js/parsexml.js">javascript</a> file contains some comments with
|
24
|
-
more information.</p>
|
25
|
-
|
26
|
-
<div class="border">
|
27
|
-
<textarea id="code" cols="120" rows="30">
|
28
|
-
<html style="color: green">
|
29
|
-
<!-- this is a comment -->
|
30
|
-
<head>
|
31
|
-
<title>HTML Example</title>
|
32
|
-
</head>
|
33
|
-
<body>
|
34
|
-
The indentation tries to be <em>somewhat &quot;do what
|
35
|
-
I mean&quot;</em>... but might not match your style.
|
36
|
-
</body>
|
37
|
-
</html>
|
38
|
-
</textarea>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<script type="text/javascript">
|
42
|
-
var editor = CodeMirror.fromTextArea('code', {
|
43
|
-
height: "350px",
|
44
|
-
parserfile: "parsexml.js",
|
45
|
-
stylesheet: "css/xmlcolors.css",
|
46
|
-
path: "js/",
|
47
|
-
continuousScanning: 500,
|
48
|
-
lineNumbers: true
|
49
|
-
});
|
50
|
-
</script>
|
51
|
-
</body>
|
52
|
-
</html>
|
@@ -1,245 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>CodeMirror</title>
|
5
|
-
<link rel="stylesheet" type="text/css" href="css/docs.css"/>
|
6
|
-
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Droid+Sans:bold"/>
|
7
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
<h1><span class="logo-braces">{ }</span> CodeMirror</h1>
|
12
|
-
|
13
|
-
<pre class="grey">
|
14
|
-
/* In-browser code editing
|
15
|
-
made almost bearable */
|
16
|
-
</pre>
|
17
|
-
|
18
|
-
<div class="clear"><div class="left blk">
|
19
|
-
|
20
|
-
<p style="margin-top: 0">CodeMirror is a JavaScript library that can be used to create a
|
21
|
-
relatively pleasant editor interface for code-like content ―
|
22
|
-
computer programs, HTML markup, and similar. If a parser has been
|
23
|
-
written for the language you are editing (see below for a list of
|
24
|
-
supported languages), the code will be coloured, and the editor will
|
25
|
-
help you with indentation.</p>
|
26
|
-
|
27
|
-
<div class="clear"><div class="left1 blk">
|
28
|
-
|
29
|
-
<h2 style="margin-top: 0">Try the parser test pages:</h2>
|
30
|
-
|
31
|
-
<ul>
|
32
|
-
<li><a href="jstest.html">JavaScript</a></li>
|
33
|
-
<li><a href="htmltest.html">XML/HTML</a></li>
|
34
|
-
<li><a href="csstest.html">CSS</a></li>
|
35
|
-
<li><a href="mixedtest.html">HTML mixed-mode</a></li>
|
36
|
-
<li><a href="sparqltest.html">SPARQL</a></li>
|
37
|
-
<li><a href="contrib/php/index.html">HTML+PHP mixed-mode</a> (courtesy of <a href="contrib/php/LICENSE">Yahoo!</a>)</li>
|
38
|
-
<li><a href="contrib/python/index.html">Python</a> (by <a href="contrib/python/LICENSE">Timothy Farrell</a>)</li>
|
39
|
-
<li><a href="contrib/lua/index.html">Lua</a> (by <a href="http://francio.pl/">Franciszek Wawrzak</a>)</li>
|
40
|
-
<li><a href="http://github.com/hakunin/ruby-in-codemirror/tree/master">Ruby</a> (by Michal Hantl, unfinished)</li>
|
41
|
-
<li><a href="contrib/sql/index.html">SQL</a> (by John Benediktsson)</li>
|
42
|
-
<li><a href="contrib/plsql/index.html">PLSQL</a> (by <a href="http://www.oracle-and-apex.com/">Peter Raganitsch</a>)</li>
|
43
|
-
<li><a href="http://www.liranuna.com/diff-parser-for-codemirror/">diff</a> (courtesy of <a href="http://www.liranuna.com">Liran Nuna</a>)</li>
|
44
|
-
<li><a href="contrib/groovy/index.html">Groovy</a> (by <a href="http://exoplatform.org/">eXo Platform</a>)</li>
|
45
|
-
<li><a href="contrib/csharp/index.html">C#</a> (by <a href="http://skilltesting.com/">Boris Gaber and Christopher Buchino</a>)</li>
|
46
|
-
<li><a href="contrib/scheme/index.html">Scheme</a> (by <a href="http://hashcollision.org/">Danny Yoo</a>)</li>
|
47
|
-
<li><a href="contrib/xquery/index.html">XQuery</a> (by <a href="http://mike.brevoort.com/">Mike Brevoort</a>)</li>
|
48
|
-
<li><a href="contrib/ometa/index.html">OmetaJS</a> (by <a href="http://erickedji.wordpress.com/">Eric KEDJI</a>)</li>
|
49
|
-
</ul>
|
50
|
-
|
51
|
-
</div><div class="left2 blk">
|
52
|
-
|
53
|
-
<h2 style="margin-top: 0">Some real-world uses:</h2>
|
54
|
-
|
55
|
-
<ul>
|
56
|
-
<li><a href="http://kml-samples.googlecode.com/svn/trunk/interactive/index.html">Google Earth KML sampler</a></li>
|
57
|
-
<li><a href="http://eloquentjavascript.net/chapter1.html">Eloquent JavaScript's console</a></li>
|
58
|
-
<li><a href="http://demo.qooxdoo.org/current/playground/#Hello_World">The qooxdoo playground</a></li>
|
59
|
-
<li><a href="http://billmill.org/static/canvastutorial/index.html">A cool tutorial about the <canvas> element</a></li>
|
60
|
-
<li><a href="http://orc.csres.utexas.edu/tryorc.shtml">An online IDE for the Orc programming language</a></li>
|
61
|
-
<li><a href="http://code.google.com/apis/ajax/playground">Google's API playground</a></li>
|
62
|
-
<li><a href="http://craic.com/tutorials/javascript/raphael_live/raphael_live.html">Raphaël Live</a></li>
|
63
|
-
<li><a href="http://jsbin.com/">JS Bin</a></li>
|
64
|
-
<li><a href="http://www.rockettheme.com/extensions-joomla/rokpad">The RokPad plugin for Joomla</a></li>
|
65
|
-
<li><a href="http://scraperwiki.com/editor/">The scraperwiki editor</a></li>
|
66
|
-
<li><a href="http://www.linb.net/VisualJS/UIBuilder.html">jsLinb UI Builder</a></li>
|
67
|
-
</ul>
|
68
|
-
|
69
|
-
</div></div>
|
70
|
-
|
71
|
-
<h2 id="supported">Supported browsers</h2>
|
72
|
-
|
73
|
-
<p>The following browsers are able to run CodeMirror:</p>
|
74
|
-
|
75
|
-
<ul>
|
76
|
-
<li>Firefox 1.5 or higher</li>
|
77
|
-
<li>Internet Explorer 6 or higher</li>
|
78
|
-
<li>Safari 3 or higher</li>
|
79
|
-
<li>Opera 9.52 or higher</li>
|
80
|
-
<li>Chrome</li>
|
81
|
-
</ul>
|
82
|
-
|
83
|
-
<p>I am not actively testing against every new browser release, and
|
84
|
-
vendors have a habit of introducing bugs all the time, so I am
|
85
|
-
relying on the community to tell me when something breaks. See <a
|
86
|
-
href="#support">below</a> for information on how to contact me.</p>
|
87
|
-
|
88
|
-
<h2 id="code">Getting the code</h2>
|
89
|
-
|
90
|
-
<p>All of CodeMirror is released under a <a
|
91
|
-
href="LICENSE">zlib-style</a> license. To get it, you can download
|
92
|
-
the <a href="http://codemirror.net/codemirror.zip">latest
|
93
|
-
release</a> or the current <a
|
94
|
-
href="http://codemirror.net/codemirror-latest.zip">development
|
95
|
-
snapshot</a> as zip files. To create a custom minified script file,
|
96
|
-
you can use the <a href="compress.html">compression API</a>.</p>
|
97
|
-
|
98
|
-
<p>We use <a href="http://git-scm.com/">git</a> for version control.
|
99
|
-
The main repository can be fetched in this way:</p>
|
100
|
-
|
101
|
-
<pre class="code">git clone http://marijn.haverbeke.nl/git/codemirror</pre>
|
102
|
-
|
103
|
-
<p>CodeMirror can also be found on GitHub: <a
|
104
|
-
href="http://github.com/marijnh/CodeMirror">http://github.com/marijnh/CodeMirror</a>.
|
105
|
-
If you plan to hack on the code and contribute patches, the best way
|
106
|
-
to do it is to create a GitHub fork, and send pull requests.</p>
|
107
|
-
|
108
|
-
<h2 id="documention">Documentation</h2>
|
109
|
-
|
110
|
-
<p>The <a href="manual.html">manual</a> is your first stop for
|
111
|
-
learning how to use this library. It starts with a quick explanation
|
112
|
-
of how to use the editor, and then describes all of the (many)
|
113
|
-
options and methods that CodeMirror exposes.</p>
|
114
|
-
|
115
|
-
<p>For those who want to learn more about the code, <a
|
116
|
-
href="story.html">this document</a> about CodeMirror's architecture
|
117
|
-
will be useful. The <a
|
118
|
-
href="http://github.com/marijnh/CodeMirror">source code</a> itself
|
119
|
-
is, for the most part, also very well commented.</p>
|
120
|
-
|
121
|
-
<h2 id="support">Support</h2>
|
122
|
-
|
123
|
-
<p>There is a <a
|
124
|
-
href="http://groups.google.com/group/codemirror">Google group</a> (a
|
125
|
-
sort of mailing list/newsgroup thing) for discussion and news
|
126
|
-
related to CodeMirror. Please check the <a href="faq.html">FAQ</a>
|
127
|
-
before asking a question. You can also e-mail me directly: <a
|
128
|
-
href="mailto:marijnh@gmail.com">Marijn Haverbeke</a>.</p>
|
129
|
-
|
130
|
-
</div>
|
131
|
-
|
132
|
-
<div class="right blk">
|
133
|
-
|
134
|
-
<a href="http://codemirror.net/codemirror.zip" class="download">Download the latest release</a>
|
135
|
-
|
136
|
-
<h2>Make a donation</h2>
|
137
|
-
|
138
|
-
<ul>
|
139
|
-
<li><span onclick="document.getElementById('paypal').submit();" class="quasilink">Paypal</span></li>
|
140
|
-
<li><span onclick="document.getElementById('bankinfo').style.display = 'block';" class="quasilink">Bank</span></li>
|
141
|
-
</ul>
|
142
|
-
|
143
|
-
<p id="bankinfo" style="display: none;">
|
144
|
-
Bank: <i>Rabobank</i><br/>
|
145
|
-
Country: <i>Netherlands</i><br/>
|
146
|
-
SWIFT: <i>RABONL2U</i><br/>
|
147
|
-
Account: <i>147850770</i><br/>
|
148
|
-
Name: <i>Marijn Haverbeke</i><br/>
|
149
|
-
IBAN: <i>NL26 RABO 0147 8507 70</i>
|
150
|
-
</p>
|
151
|
-
|
152
|
-
<h2>Releases:</h2>
|
153
|
-
|
154
|
-
<p class="rel">02-10-2010: <a
|
155
|
-
href="http://codemirror.net/codemirror-0.9.zip">Version 0.9</a>:</p>
|
156
|
-
<ul class="rel-note">
|
157
|
-
<li>Add support for searching backwards.</li>
|
158
|
-
<li>There are now parsers for <a href="contrib/scheme/index.html">Scheme</a>, <a href="contrib/xquery/index.html">XQuery</a>, and <a href="contrib/ometa/index.html">OmetaJS</a>.</li>
|
159
|
-
<li>Makes <code>height: "dynamic"</code> more robust.</li>
|
160
|
-
<li>Fixes bug where paste did not work on OS X.</li>
|
161
|
-
<li>Add a <code>enterMode</code> and <code>electricChars</code> options to make indentation even more customizable.</li>
|
162
|
-
<li>Add <code>firstLineNumber</code> option.</li>
|
163
|
-
<li>Fix bad handling of <code>@media</code> rules by the CSS parser.</li>
|
164
|
-
<li>Take a new, more robust approach to working around the invisible-last-line bug in WebKit.</li>
|
165
|
-
</ul>
|
166
|
-
|
167
|
-
<p class="rel">22-07-2010: <a
|
168
|
-
href="http://codemirror.net/codemirror-0.8.zip">Version 0.8</a>:</p>
|
169
|
-
<ul class="rel-note">
|
170
|
-
<li>Add a <code>cursorCoords</code> method to find the screen
|
171
|
-
coordinates of the cursor.</li>
|
172
|
-
<li>A number of fixes and support for more syntax in the PHP parser.</li>
|
173
|
-
<li>Fix indentation problem with JSON-mode JS parser in Webkit.</li>
|
174
|
-
<li>Add a <a href="compress.html">minification</a> UI.</li>
|
175
|
-
<li>Support a <code>height: dynamic</code> mode, where the editor's
|
176
|
-
height will adjust to the size of its content.</li>
|
177
|
-
<li>Better support for IME input mode.</li>
|
178
|
-
<li>Fix JavaScript parser getting confused when seeing a no-argument
|
179
|
-
function call.</li>
|
180
|
-
<li>Have CSS parser see the difference between selectors and other
|
181
|
-
identifiers.</li>
|
182
|
-
<li>Fix scrolling bug when pasting in a horizontally-scrolled
|
183
|
-
editor.</li>
|
184
|
-
<li>Support <code>toTextArea</code> method in instances created with
|
185
|
-
<code>fromTextArea</code>.</li>
|
186
|
-
<li>Work around new Opera cursor bug that causes the cursor to jump
|
187
|
-
when pressing backspace at the end of a line.</li>
|
188
|
-
</ul>
|
189
|
-
|
190
|
-
<p class="rel">27-04-2010: <a
|
191
|
-
href="http://codemirror.net/codemirror-0.67.zip">Version
|
192
|
-
0.67</a>:</p>
|
193
|
-
<p class="rel-note">More consistent page-up/page-down behaviour
|
194
|
-
across browsers. Fix some issues with hidden editors looping forever
|
195
|
-
when line-numbers were enabled. Make PHP parser parse
|
196
|
-
<code>"\\"</code> correctly. Have <code>jumpToLine</code> work on
|
197
|
-
line handles, and add <code>cursorLine</code> function to fetch the
|
198
|
-
line handle where the cursor currently is. Add new
|
199
|
-
<code>setStylesheet</code> function to switch style-sheets in a
|
200
|
-
running editor.</p>
|
201
|
-
|
202
|
-
<p class="rel">01-03-2010: <a
|
203
|
-
href="http://codemirror.net/codemirror-0.66.zip">Version
|
204
|
-
0.66</a>:</p>
|
205
|
-
<p class="rel-note">Adds <code>removeLine</code> method to API.
|
206
|
-
Introduces the <a href="contrib/plsql/index.html">PLSQL parser</a>.
|
207
|
-
Marks XML errors by adding (rather than replacing) a CSS class, so
|
208
|
-
that they can be disabled by modifying their style. Fixes several
|
209
|
-
selection bugs, and a number of small glitches.</p>
|
210
|
-
|
211
|
-
<p class="rel">12-11-2009: <a
|
212
|
-
href="http://codemirror.net/codemirror-0.65.zip">Version
|
213
|
-
0.65</a>:</p>
|
214
|
-
<p class="rel-note">Add support for having both line-wrapping and
|
215
|
-
line-numbers turned on, make paren-highlighting style customisable
|
216
|
-
(<code>markParen</code> and <code>unmarkParen</code> config
|
217
|
-
options), work around a selection bug that Opera
|
218
|
-
<em>re</em>introduced in version 10.</p>
|
219
|
-
|
220
|
-
<p class="rel">23-10-2009: <a
|
221
|
-
href="http://codemirror.net/codemirror-0.64.zip">Version
|
222
|
-
0.64</a>:</p>
|
223
|
-
|
224
|
-
<p class="rel-note">Solves some issues introduced by the
|
225
|
-
paste-handling changes from the previous release. Adds
|
226
|
-
<code>setSpellcheck</code>, <code>setTextWrapping</code>,
|
227
|
-
<code>setIndentUnit</code>, <code>setUndoDepth</code>,
|
228
|
-
<code>setTabMode</code>, and <code>setLineNumbers</code> to
|
229
|
-
customise a running editor. Introduces an <a
|
230
|
-
href="contrib/sql/index.html">SQL</a> parser. Fixes a few small
|
231
|
-
problems in the <a href="contrib/python/index.html">Python</a>
|
232
|
-
parser. And, as usual, add workarounds for various newly discovered
|
233
|
-
browser incompatibilities.</p>
|
234
|
-
|
235
|
-
</div></div>
|
236
|
-
|
237
|
-
<div style="height: 2em"> </div>
|
238
|
-
|
239
|
-
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal">
|
240
|
-
<input type="hidden" name="cmd" value="_s-xclick"/>
|
241
|
-
<input type="hidden" name="hosted_button_id" value="3FVHS5FGUY7CC"/>
|
242
|
-
</form>
|
243
|
-
|
244
|
-
</body>
|
245
|
-
</html>
|
@@ -1,56 +0,0 @@
|
|
1
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
-
<head>
|
3
|
-
<script src="js/codemirror.js" type="text/javascript"></script>
|
4
|
-
<script src="js/mirrorframe.js" type="text/javascript"></script>
|
5
|
-
<title>CodeMirror: JavaScript demonstration</title>
|
6
|
-
<link rel="stylesheet" type="text/css" href="css/docs.css"/>
|
7
|
-
</head>
|
8
|
-
<body style="padding: 20px;">
|
9
|
-
|
10
|
-
<p>This page demonstrates <a href="index.html">CodeMirror</a>'s
|
11
|
-
JavaScript parser. Note that the ugly buttons at the top are not are
|
12
|
-
not part of CodeMirror proper -- they demonstrate the way it can be
|
13
|
-
embedded in a web-application.</p>
|
14
|
-
|
15
|
-
<div class="border">
|
16
|
-
<textarea id="code" cols="120" rows="30">
|
17
|
-
// Here you see some JavaScript code. Mess around with it to get
|
18
|
-
// acquainted with CodeMirror's features.
|
19
|
-
|
20
|
-
// Press enter inside the object and your new line will be suitably
|
21
|
-
// indented.
|
22
|
-
var keyBindings = {
|
23
|
-
enter: "newline-and-indent",
|
24
|
-
tab: "reindent-selection",
|
25
|
-
ctrl_z: "undo",
|
26
|
-
ctrl_y: "redo",
|
27
|
-
ctrl_backspace: "undo-for-safari (which blocks ctrl-z)",
|
28
|
-
ctrl_bracket: "highlight-brackets",
|
29
|
-
ctrl_shift_bracket: "jump-to-matching-bracket"
|
30
|
-
};
|
31
|
-
|
32
|
-
// Press tab on the next line and the wrong indentation will be fixed.
|
33
|
-
var regex = /foo|bar/i;
|
34
|
-
|
35
|
-
function example(x) {
|
36
|
-
// Local variables get a different colour than global ones.
|
37
|
-
var y = 44.4;
|
38
|
-
return x + y - z;
|
39
|
-
}
|
40
|
-
</textarea>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<script type="text/javascript">
|
44
|
-
var textarea = document.getElementById('code');
|
45
|
-
var editor = new MirrorFrame(CodeMirror.replace(textarea), {
|
46
|
-
height: "350px",
|
47
|
-
content: textarea.value,
|
48
|
-
parserfile: ["tokenizejavascript.js", "parsejavascript.js"],
|
49
|
-
stylesheet: "css/jscolors.css",
|
50
|
-
path: "js/",
|
51
|
-
autoMatchParens: true
|
52
|
-
});
|
53
|
-
</script>
|
54
|
-
|
55
|
-
</body>
|
56
|
-
</html>
|