Update v1.0.6
This commit is contained in:
78
public/filemanager/scripts/CodeMirror/demo/activeline.html
vendored
Normal file
78
public/filemanager/scripts/CodeMirror/demo/activeline.html
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Active Line 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="../mode/xml/xml.js"></script>
|
||||
<script src="../addon/selection/active-line.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
</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="#">Active Line</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Active Line Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
|
||||
xmlns:georss="http://www.georss.org/georss"
|
||||
xmlns:twitter="http://api.twitter.com">
|
||||
<channel>
|
||||
<title>Twitter / codemirror</title>
|
||||
<link>http://twitter.com/codemirror</link>
|
||||
<atom:link type="application/rss+xml"
|
||||
href="http://twitter.com/statuses/user_timeline/242283288.rss" rel="self"/>
|
||||
<description>Twitter updates from CodeMirror / codemirror.</description>
|
||||
<language>en-us</language>
|
||||
<ttl>40</ttl>
|
||||
<item>
|
||||
<title>codemirror: http://cloud-ide.com — they're springing up like mushrooms. This one
|
||||
uses CodeMirror as its editor.</title>
|
||||
<description>codemirror: http://cloud-ide.com — they're springing up like mushrooms. This
|
||||
one uses CodeMirror as its editor.</description>
|
||||
<pubDate>Thu, 17 Mar 2011 23:34:47 +0000</pubDate>
|
||||
<guid>http://twitter.com/codemirror/statuses/48527733722058752</guid>
|
||||
<link>http://twitter.com/codemirror/statuses/48527733722058752</link>
|
||||
<twitter:source>web</twitter:source>
|
||||
<twitter:place/>
|
||||
</item>
|
||||
<item>
|
||||
<title>codemirror: Posted a description of the CodeMirror 2 internals at
|
||||
http://codemirror.net/2/internals.html</title>
|
||||
<description>codemirror: Posted a description of the CodeMirror 2 internals at
|
||||
http://codemirror.net/2/internals.html</description>
|
||||
<pubDate>Wed, 02 Mar 2011 12:15:09 +0000</pubDate>
|
||||
<guid>http://twitter.com/codemirror/statuses/42920879788789760</guid>
|
||||
<link>http://twitter.com/codemirror/statuses/42920879788789760</link>
|
||||
<twitter:source>web</twitter:source>
|
||||
<twitter:place/>
|
||||
</item>
|
||||
</channel>
|
||||
</rss></textarea></form>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
mode: "application/xml",
|
||||
styleActiveLine: true,
|
||||
lineNumbers: true,
|
||||
lineWrapping: true
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>Styling the current cursor line.</p>
|
||||
|
||||
</article>
|
79
public/filemanager/scripts/CodeMirror/demo/anywordhint.html
vendored
Normal file
79
public/filemanager/scripts/CodeMirror/demo/anywordhint.html
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Any Word Completion Demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/hint/show-hint.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../addon/hint/show-hint.js"></script>
|
||||
<script src="../addon/hint/anyword-hint.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
<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="#">Any Word Completion</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Any Word Completion Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var WORD = /[\w$]+/g, RANGE = 500;
|
||||
|
||||
CodeMirror.registerHelper("hint", "anyword", function(editor, options) {
|
||||
var word = options && options.word || WORD;
|
||||
var range = options && options.range || RANGE;
|
||||
var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
|
||||
var start = cur.ch, end = start;
|
||||
while (end < curLine.length && word.test(curLine.charAt(end))) ++end;
|
||||
while (start && word.test(curLine.charAt(start - 1))) --start;
|
||||
var curWord = start != end && curLine.slice(start, end);
|
||||
|
||||
var list = [], seen = {};
|
||||
function scan(dir) {
|
||||
var line = cur.line, end = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
|
||||
for (; line != end; line += dir) {
|
||||
var text = editor.getLine(line), m;
|
||||
word.lastIndex = 0;
|
||||
while (m = word.exec(text)) {
|
||||
if ((!curWord || m[0].indexOf(curWord) == 0) && !seen.hasOwnProperty(m[0])) {
|
||||
seen[m[0]] = true;
|
||||
list.push(m[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scan(-1);
|
||||
scan(1);
|
||||
return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
|
||||
});
|
||||
})();
|
||||
</textarea></form>
|
||||
|
||||
<p>Press <strong>ctrl-space</strong> to activate autocompletion. The
|
||||
completion uses
|
||||
the <a href="../doc/manual.html#addon_anyword-hint">anyword-hint.js</a>
|
||||
module, which simply looks at nearby words in the buffer and completes
|
||||
to those.</p>
|
||||
|
||||
<script>
|
||||
CodeMirror.commands.autocomplete = function(cm) {
|
||||
CodeMirror.showHint(cm, CodeMirror.hint.anyword);
|
||||
}
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
extraKeys: {"Ctrl-Space": "autocomplete"}
|
||||
});
|
||||
</script>
|
||||
</article>
|
74
public/filemanager/scripts/CodeMirror/demo/bidi.html
vendored
Normal file
74
public/filemanager/scripts/CodeMirror/demo/bidi.html
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Bi-directional Text 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="../mode/xml/xml.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
</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="#">Bi-directional Text</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Bi-directional Text Demo</h2>
|
||||
<form><textarea id="code" name="code"><!-- Piece of the CodeMirror manual, 'translated' into Arabic by
|
||||
Google Translate -->
|
||||
|
||||
<dl>
|
||||
<dt id=option_value><code>value (string or Doc)</code></dt>
|
||||
<dd>قيمة البداية المحرر. يمكن أن تكون سلسلة، أو. كائن مستند.</dd>
|
||||
<dt id=option_mode><code>mode (string or object)</code></dt>
|
||||
<dd>وضع الاستخدام. عندما لا تعطى، وهذا الافتراضي إلى الطريقة الاولى
|
||||
التي تم تحميلها. قد يكون من سلسلة، والتي إما أسماء أو ببساطة هو وضع
|
||||
MIME نوع المرتبطة اسطة. بدلا من ذلك، قد يكون من كائن يحتوي على
|
||||
خيارات التكوين لواسطة، مع <code>name</code> الخاصية التي وضع أسماء
|
||||
(على سبيل المثال <code>{name: "javascript", json: true}</code>).
|
||||
صفحات التجريبي لكل وضع تحتوي على معلومات حول ما معلمات تكوين وضع
|
||||
يدعمها. يمكنك أن تطلب CodeMirror التي تم تعريفها طرق وأنواع MIME
|
||||
الكشف على <code>CodeMirror.modes</code>
|
||||
و <code>CodeMirror.mimeModes</code> الكائنات. وضع خرائط الأسماء
|
||||
الأولى لمنشئات الخاصة بهم، وخرائط لأنواع MIME 2 المواصفات
|
||||
واسطة.</dd>
|
||||
<dt id=option_theme><code>theme (string)</code></dt>
|
||||
<dd>موضوع لنمط المحرر مع. يجب عليك التأكد من الملف CSS تحديد
|
||||
المقابلة <code>.cm-s-[name]</code> يتم تحميل أنماط (انظر
|
||||
<a href="../theme/"><code>theme</code></a> الدليل في التوزيع).
|
||||
الافتراضي هو <code>"default"</code> ، والتي تم تضمينها في
|
||||
الألوان <code>codemirror.css</code>. فمن الممكن استخدام فئات متعددة
|
||||
في تطبيق السمات مرة واحدة على سبيل المثال <code>"foo bar"</code>
|
||||
سيتم تعيين كل من <code>cm-s-foo</code> و <code>cm-s-bar</code>
|
||||
الطبقات إلى المحرر.</dd>
|
||||
</dl>
|
||||
</textarea></form>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
mode: "text/html",
|
||||
lineNumbers: true
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>Demonstration of bi-directional text support. See
|
||||
the <a href="http://marijnhaverbeke.nl/blog/cursor-in-bidi-text.html">related
|
||||
blog post</a> for more background.</p>
|
||||
|
||||
<p><strong>Note:</strong> There is
|
||||
a <a href="https://github.com/marijnh/CodeMirror/issues/1757">known
|
||||
bug</a> with cursor motion and mouse clicks in bi-directional lines
|
||||
that are line wrapped.</p>
|
||||
|
||||
</article>
|
85
public/filemanager/scripts/CodeMirror/demo/btree.html
vendored
Normal file
85
public/filemanager/scripts/CodeMirror/demo/btree.html
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: B-Tree visualization</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>
|
||||
<style type="text/css">
|
||||
.lineblock { display: inline-block; margin: 1px; height: 5px; }
|
||||
.CodeMirror {border: 1px solid #aaa; height: 400px}
|
||||
</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="#">B-Tree visualization</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>B-Tree visualization</h2>
|
||||
<form><textarea id="code" name="code">type here, see a summary of the document b-tree below</textarea></form>
|
||||
</div>
|
||||
<div style="display: inline-block; height: 402px; overflow-y: auto" id="output"></div>
|
||||
</div>
|
||||
|
||||
<script id="me">
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
lineWrapping: true
|
||||
});
|
||||
var updateTimeout;
|
||||
editor.on("change", function(cm) {
|
||||
clearTimeout(updateTimeout);
|
||||
updateTimeout = setTimeout(updateVisual, 200);
|
||||
});
|
||||
updateVisual();
|
||||
|
||||
function updateVisual() {
|
||||
var out = document.getElementById("output");
|
||||
out.innerHTML = "";
|
||||
|
||||
function drawTree(out, node) {
|
||||
if (node.lines) {
|
||||
out.appendChild(document.createElement("div")).innerHTML =
|
||||
"<b>leaf</b>: " + node.lines.length + " lines, " + Math.round(node.height) + " px";
|
||||
var lines = out.appendChild(document.createElement("div"));
|
||||
lines.style.lineHeight = "6px"; lines.style.marginLeft = "10px";
|
||||
for (var i = 0; i < node.lines.length; ++i) {
|
||||
var line = node.lines[i], lineElt = lines.appendChild(document.createElement("div"));
|
||||
lineElt.className = "lineblock";
|
||||
var gray = Math.min(line.text.length * 3, 230), col = gray.toString(16);
|
||||
if (col.length == 1) col = "0" + col;
|
||||
lineElt.style.background = "#" + col + col + col;
|
||||
lineElt.style.width = Math.max(Math.round(line.height / 3), 1) + "px";
|
||||
}
|
||||
} else {
|
||||
out.appendChild(document.createElement("div")).innerHTML =
|
||||
"<b>node</b>: " + node.size + " lines, " + Math.round(node.height) + " px";
|
||||
var sub = out.appendChild(document.createElement("div"));
|
||||
sub.style.paddingLeft = "20px";
|
||||
for (var i = 0; i < node.children.length; ++i)
|
||||
drawTree(sub, node.children[i]);
|
||||
}
|
||||
}
|
||||
drawTree(out, editor.getDoc());
|
||||
}
|
||||
|
||||
function fillEditor() {
|
||||
var sc = document.getElementById("me");
|
||||
var doc = (sc.textContent || sc.innerText || sc.innerHTML).replace(/^\s*/, "") + "\n";
|
||||
doc += doc; doc += doc; doc += doc; doc += doc; doc += doc; doc += doc;
|
||||
editor.setValue(doc);
|
||||
}
|
||||
</script>
|
||||
|
||||
<p><button onclick="fillEditor()">Add a lot of content</button></p>
|
||||
|
||||
</article>
|
109
public/filemanager/scripts/CodeMirror/demo/buffers.html
vendored
Normal file
109
public/filemanager/scripts/CodeMirror/demo/buffers.html
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Multiple Buffer & Split View 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="../mode/javascript/javascript.js"></script>
|
||||
<script src="../mode/css/css.js"></script>
|
||||
<style type="text/css" id=style>
|
||||
.CodeMirror {border: 1px solid black; height: 250px;}
|
||||
</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="#">Multiple Buffer & Split View</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Multiple Buffer & Split View Demo</h2>
|
||||
|
||||
|
||||
<div id=code_top></div>
|
||||
<div>
|
||||
Select buffer: <select id=buffers_top></select>
|
||||
<button onclick="newBuf('top')">New buffer</button>
|
||||
</div>
|
||||
<div id=code_bot></div>
|
||||
<div>
|
||||
Select buffer: <select id=buffers_bot></select>
|
||||
<button onclick="newBuf('bot')">New buffer</button>
|
||||
</div>
|
||||
|
||||
<script id=script>
|
||||
var sel_top = document.getElementById("buffers_top");
|
||||
CodeMirror.on(sel_top, "change", function() {
|
||||
selectBuffer(ed_top, sel_top.options[sel_top.selectedIndex].value);
|
||||
});
|
||||
|
||||
var sel_bot = document.getElementById("buffers_bot");
|
||||
CodeMirror.on(sel_bot, "change", function() {
|
||||
selectBuffer(ed_bot, sel_bot.options[sel_bot.selectedIndex].value);
|
||||
});
|
||||
|
||||
var buffers = {};
|
||||
|
||||
function openBuffer(name, text, mode) {
|
||||
buffers[name] = CodeMirror.Doc(text, mode);
|
||||
var opt = document.createElement("option");
|
||||
opt.appendChild(document.createTextNode(name));
|
||||
sel_top.appendChild(opt);
|
||||
sel_bot.appendChild(opt.cloneNode(true));
|
||||
}
|
||||
|
||||
function newBuf(where) {
|
||||
var name = prompt("Name for the buffer", "*scratch*");
|
||||
if (name == null) return;
|
||||
if (buffers.hasOwnProperty(name)) {
|
||||
alert("There's already a buffer by that name.");
|
||||
return;
|
||||
}
|
||||
openBuffer(name, "", "javascript");
|
||||
selectBuffer(where == "top" ? ed_top : ed_bot, name);
|
||||
var sel = where == "top" ? sel_top : sel_bot;
|
||||
sel.value = name;
|
||||
}
|
||||
|
||||
function selectBuffer(editor, name) {
|
||||
var buf = buffers[name];
|
||||
if (buf.getEditor()) buf = buf.linkedDoc({sharedHist: true});
|
||||
var old = editor.swapDoc(buf);
|
||||
var linked = old.iterLinkedDocs(function(doc) {linked = doc;});
|
||||
if (linked) {
|
||||
// Make sure the document in buffers is the one the other view is looking at
|
||||
for (var name in buffers) if (buffers[name] == old) buffers[name] = linked;
|
||||
old.unlinkDoc(linked);
|
||||
}
|
||||
editor.focus();
|
||||
}
|
||||
|
||||
function nodeContent(id) {
|
||||
var node = document.getElementById(id), val = node.textContent || node.innerText;
|
||||
val = val.slice(val.match(/^\s*/)[0].length, val.length - val.match(/\s*$/)[0].length) + "\n";
|
||||
return val;
|
||||
}
|
||||
openBuffer("js", nodeContent("script"), "javascript");
|
||||
openBuffer("css", nodeContent("style"), "css");
|
||||
|
||||
var ed_top = CodeMirror(document.getElementById("code_top"), {lineNumbers: true});
|
||||
selectBuffer(ed_top, "js");
|
||||
var ed_bot = CodeMirror(document.getElementById("code_bot"), {lineNumbers: true});
|
||||
selectBuffer(ed_bot, "js");
|
||||
</script>
|
||||
|
||||
<p>Demonstration of
|
||||
using <a href="../doc/manual.html#linkedDoc">linked documents</a>
|
||||
to provide a split view on a document, and
|
||||
using <a href="../doc/manual.html#swapDoc"><code>swapDoc</code></a>
|
||||
to use a single editor to display multiple documents.</p>
|
||||
|
||||
</article>
|
58
public/filemanager/scripts/CodeMirror/demo/changemode.html
vendored
Normal file
58
public/filemanager/scripts/CodeMirror/demo/changemode.html
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Mode-Changing 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="../mode/javascript/javascript.js"></script>
|
||||
<script src="../mode/scheme/scheme.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border: 1px solid black;}
|
||||
</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="#">Mode-Changing</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Mode-Changing Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
;; If there is Scheme code in here, the editor will be in Scheme mode.
|
||||
;; If you put in JS instead, it'll switch to JS mode.
|
||||
|
||||
(define (double x)
|
||||
(* x x))
|
||||
</textarea></form>
|
||||
|
||||
<p>On changes to the content of the above editor, a (crude) script
|
||||
tries to auto-detect the language used, and switches the editor to
|
||||
either JavaScript or Scheme mode based on that.</p>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
mode: "scheme",
|
||||
lineNumbers: true
|
||||
});
|
||||
var pending;
|
||||
editor.on("change", function() {
|
||||
clearTimeout(pending);
|
||||
pending = setTimeout(update, 400);
|
||||
});
|
||||
function looksLikeScheme(code) {
|
||||
return !/^\s*\(\s*function\b/.test(code) && /^\s*[;\(]/.test(code);
|
||||
}
|
||||
function update() {
|
||||
editor.setOption("mode", looksLikeScheme(editor.getValue()) ? "scheme" : "javascript");
|
||||
}
|
||||
</script>
|
||||
</article>
|
52
public/filemanager/scripts/CodeMirror/demo/closebrackets.html
vendored
Normal file
52
public/filemanager/scripts/CodeMirror/demo/closebrackets.html
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Closebrackets 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/closebrackets.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid #888; border-bottom: 1px solid #888;}
|
||||
</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="#">Closebrackets</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Closebrackets Demo</h2>
|
||||
<form><textarea id="code" name="code">function Grid(width, height) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.cells = new Array(width * height);
|
||||
}
|
||||
Grid.prototype.valueAt = function(point) {
|
||||
return this.cells[point.y * this.width + point.x];
|
||||
};
|
||||
Grid.prototype.setValueAt = function(point, value) {
|
||||
this.cells[point.y * this.width + point.x] = value;
|
||||
};
|
||||
Grid.prototype.isInside = function(point) {
|
||||
return point.x >= 0 && point.y >= 0 &&
|
||||
point.x < this.width && point.y < this.height;
|
||||
};
|
||||
Grid.prototype.moveValue = function(from, to) {
|
||||
this.setValueAt(to, this.valueAt(from));
|
||||
this.setValueAt(from, undefined);
|
||||
};</textarea></form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {autoCloseBrackets: true});
|
||||
</script>
|
||||
</article>
|
41
public/filemanager/scripts/CodeMirror/demo/closetag.html
vendored
Normal file
41
public/filemanager/scripts/CodeMirror/demo/closetag.html
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Close-Tag 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/closetag.js"></script>
|
||||
<script src="../addon/fold/xml-fold.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
<script src="../mode/css/css.js"></script>
|
||||
<script src="../mode/htmlmixed/htmlmixed.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid #888; border-bottom: 1px solid #888;}
|
||||
</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="#">Close-Tag</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Close-Tag Demo</h2>
|
||||
<form><textarea id="code" name="code"><html</textarea></form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
mode: 'text/html',
|
||||
autoCloseTags: true
|
||||
});
|
||||
</script>
|
||||
</article>
|
79
public/filemanager/scripts/CodeMirror/demo/complete.html
vendored
Normal file
79
public/filemanager/scripts/CodeMirror/demo/complete.html
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Autocomplete Demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/hint/show-hint.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../addon/hint/show-hint.js"></script>
|
||||
<script src="../addon/hint/javascript-hint.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
|
||||
<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="#">Autocomplete</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Autocomplete Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
function getCompletions(token, context) {
|
||||
var found = [], start = token.string;
|
||||
function maybeAdd(str) {
|
||||
if (str.indexOf(start) == 0) found.push(str);
|
||||
}
|
||||
function gatherCompletions(obj) {
|
||||
if (typeof obj == "string") forEach(stringProps, maybeAdd);
|
||||
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
|
||||
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
|
||||
for (var name in obj) maybeAdd(name);
|
||||
}
|
||||
|
||||
if (context) {
|
||||
// If this is a property, see if it belongs to some object we can
|
||||
// find in the current environment.
|
||||
var obj = context.pop(), base;
|
||||
if (obj.className == "js-variable")
|
||||
base = window[obj.string];
|
||||
else if (obj.className == "js-string")
|
||||
base = "";
|
||||
else if (obj.className == "js-atom")
|
||||
base = 1;
|
||||
while (base != null && context.length)
|
||||
base = base[context.pop().string];
|
||||
if (base != null) gatherCompletions(base);
|
||||
}
|
||||
else {
|
||||
// If not, just look in the window object and any local scope
|
||||
// (reading into JS mode internals to get at the local variables)
|
||||
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
|
||||
gatherCompletions(window);
|
||||
forEach(keywords, maybeAdd);
|
||||
}
|
||||
return found;
|
||||
}
|
||||
</textarea></form>
|
||||
|
||||
<p>Press <strong>ctrl-space</strong> to activate autocompletion. Built
|
||||
on top of the <a href="../doc/manual.html#addon_show-hint"><code>show-hint</code></a>
|
||||
and <a href="../doc/manual.html#addon_javascript-hint"><code>javascript-hint</code></a>
|
||||
addons.</p>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
extraKeys: {"Ctrl-Space": "autocomplete"},
|
||||
mode: {name: "javascript", globalVars: true}
|
||||
});
|
||||
</script>
|
||||
</article>
|
75
public/filemanager/scripts/CodeMirror/demo/emacs.html
vendored
Normal file
75
public/filemanager/scripts/CodeMirror/demo/emacs.html
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Emacs bindings demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/dialog/dialog.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../mode/clike/clike.js"></script>
|
||||
<script src="../keymap/emacs.js"></script>
|
||||
<script src="../addon/edit/matchbrackets.js"></script>
|
||||
<script src="../addon/comment/comment.js"></script>
|
||||
<script src="../addon/dialog/dialog.js"></script>
|
||||
<script src="../addon/search/searchcursor.js"></script>
|
||||
<script src="../addon/search/search.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee;}
|
||||
</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="#">Emacs bindings</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Emacs bindings demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
#include "syscalls.h"
|
||||
/* getchar: simple buffered version */
|
||||
int getchar(void)
|
||||
{
|
||||
static char buf[BUFSIZ];
|
||||
static char *bufp = buf;
|
||||
static int n = 0;
|
||||
if (n == 0) { /* buffer is empty */
|
||||
n = read(0, buf, sizeof buf);
|
||||
bufp = buf;
|
||||
}
|
||||
return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
|
||||
}
|
||||
</textarea></form>
|
||||
|
||||
<p>The emacs keybindings are enabled by
|
||||
including <a href="../keymap/emacs.js">keymap/emacs.js</a> and setting
|
||||
the <code>keyMap</code> option to <code>"emacs"</code>. Because
|
||||
CodeMirror's internal API is quite different from Emacs, they are only
|
||||
a loose approximation of actual emacs bindings, though.</p>
|
||||
|
||||
<p>Also note that a lot of browsers disallow certain keys from being
|
||||
captured. For example, Chrome blocks both Ctrl-W and Ctrl-N, with the
|
||||
result that idiomatic use of Emacs keys will constantly close your tab
|
||||
or open a new window.</p>
|
||||
|
||||
<script>
|
||||
CodeMirror.commands.save = function() {
|
||||
var elt = editor.getWrapperElement();
|
||||
elt.style.background = "#def";
|
||||
setTimeout(function() { elt.style.background = ""; }, 300);
|
||||
};
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
mode: "text/x-csrc",
|
||||
keyMap: "emacs"
|
||||
});
|
||||
</script>
|
||||
|
||||
</article>
|
95
public/filemanager/scripts/CodeMirror/demo/folding.html
vendored
Normal file
95
public/filemanager/scripts/CodeMirror/demo/folding.html
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
<!doctype html>
|
||||
|
||||
<head>
|
||||
<title>CodeMirror: Code Folding Demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/fold/foldgutter.css" />
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../addon/fold/foldcode.js"></script>
|
||||
<script src="../addon/fold/foldgutter.js"></script>
|
||||
<script src="../addon/fold/brace-fold.js"></script>
|
||||
<script src="../addon/fold/xml-fold.js"></script>
|
||||
<script src="../addon/fold/markdown-fold.js"></script>
|
||||
<script src="../addon/fold/comment-fold.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<script src="../mode/markdown/markdown.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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="#">Code Folding</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Code Folding Demo</h2>
|
||||
<form>
|
||||
<div style="max-width: 50em; margin-bottom: 1em">JavaScript:<br>
|
||||
<textarea id="code" name="code"></textarea></div>
|
||||
<div style="max-width: 50em; margin-bottom: 1em">HTML:<br>
|
||||
<textarea id="code-html" name="code-html"></textarea></div>
|
||||
<div style="max-width: 50em">Markdown:<br>
|
||||
<textarea id="code-markdown" name="code"></textarea></div>
|
||||
</form>
|
||||
<script id="script">
|
||||
/*
|
||||
* Demonstration of code folding
|
||||
*/
|
||||
window.onload = function() {
|
||||
var te = document.getElementById("code");
|
||||
var sc = document.getElementById("script");
|
||||
te.value = (sc.textContent || sc.innerText || sc.innerHTML).replace(/^\s*/, "");
|
||||
sc.innerHTML = "";
|
||||
var te_html = document.getElementById("code-html");
|
||||
te_html.value = document.documentElement.innerHTML;
|
||||
var te_markdown = document.getElementById("code-markdown");
|
||||
te_markdown.value = "# Foo\n## Bar\n\nblah blah\n\n## Baz\n\nblah blah\n\n# Quux\n\nblah blah\n"
|
||||
|
||||
window.editor = CodeMirror.fromTextArea(te, {
|
||||
mode: "javascript",
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
extraKeys: {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }},
|
||||
foldGutter: true,
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
|
||||
});
|
||||
editor.foldCode(CodeMirror.Pos(11, 0));
|
||||
|
||||
window.editor_html = CodeMirror.fromTextArea(te_html, {
|
||||
mode: "text/html",
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
extraKeys: {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }},
|
||||
foldGutter: true,
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
|
||||
});
|
||||
editor_html.foldCode(CodeMirror.Pos(0, 0));
|
||||
editor_html.foldCode(CodeMirror.Pos(21, 0));
|
||||
|
||||
window.editor_markdown = CodeMirror.fromTextArea(te_markdown, {
|
||||
mode: "markdown",
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
extraKeys: {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }},
|
||||
foldGutter: true,
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</article>
|
||||
</body>
|
83
public/filemanager/scripts/CodeMirror/demo/fullscreen.html
vendored
Normal file
83
public/filemanager/scripts/CodeMirror/demo/fullscreen.html
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Full Screen Editing</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/display/fullscreen.css">
|
||||
<link rel="stylesheet" href="../theme/night.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<script src="../addon/display/fullscreen.js"></script>
|
||||
|
||||
<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="#">Full Screen Editing</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Full Screen Editing</h2>
|
||||
<form><textarea id="code" name="code" rows="5">
|
||||
<dl>
|
||||
<dt id="option_indentWithTabs"><code><strong>indentWithTabs</strong>: boolean</code></dt>
|
||||
<dd>Whether, when indenting, the first N*<code>tabSize</code>
|
||||
spaces should be replaced by N tabs. Default is false.</dd>
|
||||
|
||||
<dt id="option_electricChars"><code><strong>electricChars</strong>: boolean</code></dt>
|
||||
<dd>Configures whether the editor should re-indent the current
|
||||
line when a character is typed that might change its proper
|
||||
indentation (only works if the mode supports indentation).
|
||||
Default is true.</dd>
|
||||
|
||||
<dt id="option_specialChars"><code><strong>specialChars</strong>: RegExp</code></dt>
|
||||
<dd>A regular expression used to determine which characters
|
||||
should be replaced by a
|
||||
special <a href="#option_specialCharPlaceholder">placeholder</a>.
|
||||
Mostly useful for non-printing special characters. The default
|
||||
is <code>/[\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/</code>.</dd>
|
||||
<dt id="option_specialCharPlaceholder"><code><strong>specialCharPlaceholder</strong>: function(char) → Element</code></dt>
|
||||
<dd>A function that, given a special character identified by
|
||||
the <a href="#option_specialChars"><code>specialChars</code></a>
|
||||
option, produces a DOM node that is used to represent the
|
||||
character. By default, a red dot (<span style="color: red">•</span>)
|
||||
is shown, with a title tooltip to indicate the character code.</dd>
|
||||
|
||||
<dt id="option_rtlMoveVisually"><code><strong>rtlMoveVisually</strong>: boolean</code></dt>
|
||||
<dd>Determines whether horizontal cursor movement through
|
||||
right-to-left (Arabic, Hebrew) text is visual (pressing the left
|
||||
arrow moves the cursor left) or logical (pressing the left arrow
|
||||
moves to the next lower index in the string, which is visually
|
||||
right in right-to-left text). The default is <code>false</code>
|
||||
on Windows, and <code>true</code> on other platforms.</dd>
|
||||
</dl>
|
||||
</textarea></form>
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
theme: "night",
|
||||
extraKeys: {
|
||||
"F11": function(cm) {
|
||||
cm.setOption("fullScreen", !cm.getOption("fullScreen"));
|
||||
},
|
||||
"Esc": function(cm) {
|
||||
if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>Demonstration of
|
||||
the <a href="../doc/manual.html#addon_fullscreen">fullscreen</a>
|
||||
addon. Press <strong>F11</strong> when cursor is in the editor to
|
||||
toggle full screen editing. <strong>Esc</strong> can also be used
|
||||
to <i>exit</i> full screen editing.</p>
|
||||
</article>
|
72
public/filemanager/scripts/CodeMirror/demo/hardwrap.html
vendored
Normal file
72
public/filemanager/scripts/CodeMirror/demo/hardwrap.html
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Hard-wrapping 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="../mode/markdown/markdown.js"></script>
|
||||
<script src="../addon/wrap/hardwrap.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
</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="#">Hard-wrapping</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Hard-wrapping Demo</h2>
|
||||
<form><textarea id="code" name="code">Lorem ipsum dolor sit amet, vim augue dictas constituto ex,
|
||||
sit falli simul viderer te. Graeco scaevola maluisset sit
|
||||
ut, in idque viris praesent sea. Ea sea eirmod indoctum
|
||||
repudiare. Vel noluisse suscipit pericula ut. In ius nulla
|
||||
alienum molestie. Mei essent discere democritum id.
|
||||
|
||||
Equidem ponderum expetendis ius in, mea an erroribus
|
||||
constituto, congue timeam perfecto ad est. Ius ut primis
|
||||
timeam, per in ullum mediocrem. An case vero labitur pri,
|
||||
vel dicit laoreet et. An qui prompta conclusionemque, eam
|
||||
timeam sapientem in, cum dictas epicurei eu.
|
||||
|
||||
Usu cu vide dictas deseruisse, eum choro graece adipiscing
|
||||
ut. Cibo qualisque ius ad, et dicat scripta mea, eam nihil
|
||||
mentitum aliquando cu. Debet aperiam splendide at quo, ad
|
||||
paulo nostro commodo duo. Sea adhuc utinam conclusionemque
|
||||
id, quas doming malorum nec ad. Tollit eruditi vivendum ad
|
||||
ius, eos soleat ignota ad.
|
||||
</textarea></form>
|
||||
|
||||
<p>Demonstration of
|
||||
the <a href="../doc/manual.html#addon_hardwrap">hardwrap</a> addon.
|
||||
The above editor has its change event hooked up to
|
||||
the <code>wrapParagraphsInRange</code> method, so that the paragraphs
|
||||
are reflown as you are typing.</p>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
mode: "markdown",
|
||||
lineNumbers: true,
|
||||
extraKeys: {
|
||||
"Ctrl-Q": function(cm) { cm.wrapParagraph(cm.getCursor(), options); }
|
||||
}
|
||||
});
|
||||
var wait, options = {column: 60};
|
||||
editor.on("change", function(cm, change) {
|
||||
clearTimeout(wait);
|
||||
wait = setTimeout(function() {
|
||||
console.log(cm.wrapParagraphsInRange(change.from, CodeMirror.changeEnd(change), options));
|
||||
}, 200);
|
||||
});
|
||||
</script>
|
||||
|
||||
</article>
|
56
public/filemanager/scripts/CodeMirror/demo/html5complete.html
vendored
Normal file
56
public/filemanager/scripts/CodeMirror/demo/html5complete.html
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<!doctype html>
|
||||
|
||||
<head>
|
||||
<title>CodeMirror: HTML completion demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/hint/show-hint.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../addon/hint/show-hint.js"></script>
|
||||
<script src="../addon/hint/xml-hint.js"></script>
|
||||
<script src="../addon/hint/html-hint.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
<script src="../mode/css/css.js"></script>
|
||||
<script src="../mode/htmlmixed/htmlmixed.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid #888; border-bottom: 1px solid #888;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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="#">HTML completion</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>HTML completion demo</h2>
|
||||
|
||||
<p>Shows the <a href="xmlcomplete.html">XML completer</a>
|
||||
parameterized with information about the tags in HTML.
|
||||
Press <strong>ctrl-space</strong> to activate completion.</p>
|
||||
|
||||
<div id="code"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
editor = CodeMirror(document.getElementById("code"), {
|
||||
mode: "text/html",
|
||||
extraKeys: {"Ctrl-Space": "autocomplete"},
|
||||
value: document.documentElement.innerHTML
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</article>
|
||||
</body>
|
59
public/filemanager/scripts/CodeMirror/demo/indentwrap.html
vendored
Normal file
59
public/filemanager/scripts/CodeMirror/demo/indentwrap.html
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Indented wrapped line 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="../mode/xml/xml.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
.CodeMirror pre > * { text-indent: 0px; }
|
||||
</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="#">Indented wrapped line</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Indented wrapped line demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
<!doctype html>
|
||||
<body>
|
||||
<h2 id="overview">Overview</h2>
|
||||
|
||||
<p>CodeMirror is a code-editor component that can be embedded in Web pages. The core library provides <em>only</em> the editor component, no accompanying buttons, auto-completion, or other IDE functionality. It does provide a rich API on top of which such functionality can be straightforwardly implemented. See the <a href="#addons">add-ons</a> included in the distribution, and the <a href="https://github.com/jagthedrummer/codemirror-ui">CodeMirror UI</a> project, for reusable implementations of extra features.</p>
|
||||
|
||||
<p>CodeMirror works with language-specific modes. Modes are JavaScript programs that help color (and optionally indent) text written in a given language. The distribution comes with a number of modes (see the <a href="../mode/"><code>mode/</code></a> directory), and it isn't hard to <a href="#modeapi">write new ones</a> for other languages.</p>
|
||||
</body>
|
||||
</textarea></form>
|
||||
|
||||
<p>This page uses a hack on top of the <code>"renderLine"</code>
|
||||
event to make wrapped text line up with the base indentation of
|
||||
the line.</p>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
mode: "text/html"
|
||||
});
|
||||
var charWidth = editor.defaultCharWidth(), basePadding = 4;
|
||||
editor.on("renderLine", function(cm, line, elt) {
|
||||
var off = CodeMirror.countColumn(line.text, null, cm.getOption("tabSize")) * charWidth;
|
||||
elt.style.textIndent = "-" + off + "px";
|
||||
elt.style.paddingLeft = (basePadding + off) + "px";
|
||||
});
|
||||
editor.refresh();
|
||||
</script>
|
||||
|
||||
</article>
|
171
public/filemanager/scripts/CodeMirror/demo/lint.html
vendored
Normal file
171
public/filemanager/scripts/CodeMirror/demo/lint.html
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Linter Demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/lint/lint.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
<script src="../mode/css/css.js"></script>
|
||||
<script src="http://ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js"></script>
|
||||
<script src="https://rawgithub.com/zaach/jsonlint/79b553fb65c192add9066da64043458981b3972b/lib/jsonlint.js"></script>
|
||||
<script src="https://rawgithub.com/stubbornella/csslint/master/release/csslint.js"></script>
|
||||
<script src="../addon/lint/lint.js"></script>
|
||||
<script src="../addon/lint/javascript-lint.js"></script>
|
||||
<script src="../addon/lint/json-lint.js"></script>
|
||||
<script src="../addon/lint/css-lint.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border: 1px solid black;}
|
||||
</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="#">Linter</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Linter Demo</h2>
|
||||
|
||||
|
||||
<p><textarea id="code-js">var widgets = []
|
||||
function updateHints() {
|
||||
editor.operation(function(){
|
||||
for (var i = 0; i < widgets.length; ++i)
|
||||
editor.removeLineWidget(widgets[i]);
|
||||
widgets.length = 0;
|
||||
|
||||
JSHINT(editor.getValue());
|
||||
for (var i = 0; i < JSHINT.errors.length; ++i) {
|
||||
var err = JSHINT.errors[i];
|
||||
if (!err) continue;
|
||||
var msg = document.createElement("div");
|
||||
var icon = msg.appendChild(document.createElement("span"));
|
||||
icon.innerHTML = "!!";
|
||||
icon.className = "lint-error-icon";
|
||||
msg.appendChild(document.createTextNode(err.reason));
|
||||
msg.className = "lint-error";
|
||||
widgets.push(editor.addLineWidget(err.line - 1, msg, {coverGutter: false, noHScroll: true}));
|
||||
}
|
||||
});
|
||||
var info = editor.getScrollInfo();
|
||||
var after = editor.charCoords({line: editor.getCursor().line + 1, ch: 0}, "local").top;
|
||||
if (info.top + info.clientHeight < after)
|
||||
editor.scrollTo(null, after - info.clientHeight + 3);
|
||||
}
|
||||
</textarea></p>
|
||||
|
||||
<p><textarea id="code-json">[
|
||||
{
|
||||
_id: "post 1",
|
||||
"author": "Bob",
|
||||
"content": "...",
|
||||
"page_views": 5
|
||||
},
|
||||
{
|
||||
"_id": "post 2",
|
||||
"author": "Bob",
|
||||
"content": "...",
|
||||
"page_views": 9
|
||||
},
|
||||
{
|
||||
"_id": "post 3",
|
||||
"author": "Bob",
|
||||
"content": "...",
|
||||
"page_views": 8
|
||||
}
|
||||
]
|
||||
</textarea></p>
|
||||
|
||||
<p><textarea id="code-css">@charset "UTF-8";
|
||||
|
||||
@import url("booya.css") print, screen;
|
||||
@import "whatup.css" screen;
|
||||
@import "wicked.css";
|
||||
|
||||
/*Error*/
|
||||
@charset "UTF-8";
|
||||
|
||||
|
||||
@namespace "http://www.w3.org/1999/xhtml";
|
||||
@namespace svg "http://www.w3.org/2000/svg";
|
||||
|
||||
/*Warning: empty ruleset */
|
||||
.foo {
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/*Warning: qualified heading */
|
||||
.foo h1 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/*Warning: adjoining classes */
|
||||
.foo.bar {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
li.inline {
|
||||
width: 100%; /*Warning: 100% can be problematic*/
|
||||
}
|
||||
|
||||
li.last {
|
||||
display: inline;
|
||||
padding-left: 3px !important;
|
||||
padding-right: 3px;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
li.inline {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 10%;
|
||||
counter-increment: page;
|
||||
|
||||
@top-center {
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 2em;
|
||||
content: counter(page);
|
||||
}
|
||||
}
|
||||
</textarea></p>
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code-js"), {
|
||||
lineNumbers: true,
|
||||
mode: "javascript",
|
||||
gutters: ["CodeMirror-lint-markers"],
|
||||
lint: true
|
||||
});
|
||||
|
||||
var editor_json = CodeMirror.fromTextArea(document.getElementById("code-json"), {
|
||||
lineNumbers: true,
|
||||
mode: "application/json",
|
||||
gutters: ["CodeMirror-lint-markers"],
|
||||
lint: true
|
||||
});
|
||||
|
||||
var editor_css = CodeMirror.fromTextArea(document.getElementById("code-css"), {
|
||||
lineNumbers: true,
|
||||
mode: "css",
|
||||
gutters: ["CodeMirror-lint-markers"],
|
||||
lint: true
|
||||
});
|
||||
</script>
|
||||
|
||||
</article>
|
49
public/filemanager/scripts/CodeMirror/demo/loadmode.html
vendored
Normal file
49
public/filemanager/scripts/CodeMirror/demo/loadmode.html
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Lazy Mode Loading 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/mode/loadmode.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
</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="#">Lazy Mode Loading</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Lazy Mode Loading Demo</h2>
|
||||
<form><textarea id="code" name="code">This is the editor.
|
||||
// It starts out in plain text mode,
|
||||
# use the control below to load and apply a mode
|
||||
"you'll see the highlighting of" this text /*change*/.
|
||||
</textarea></form>
|
||||
<p><input type=text value=javascript id=mode> <button type=button onclick="change()">change mode</button></p>
|
||||
|
||||
<script>
|
||||
CodeMirror.modeURL = "../mode/%N/%N.js";
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true
|
||||
});
|
||||
var modeInput = document.getElementById("mode");
|
||||
CodeMirror.on(modeInput, "keypress", function(e) {
|
||||
if (e.keyCode == 13) change();
|
||||
});
|
||||
function change() {
|
||||
editor.setOption("mode", modeInput.value);
|
||||
CodeMirror.autoLoadMode(editor, modeInput.value);
|
||||
}
|
||||
</script>
|
||||
</article>
|
52
public/filemanager/scripts/CodeMirror/demo/marker.html
vendored
Normal file
52
public/filemanager/scripts/CodeMirror/demo/marker.html
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Breakpoint 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="../mode/javascript/javascript.js"></script>
|
||||
<style type="text/css">
|
||||
.breakpoints {width: .8em;}
|
||||
.breakpoint { color: #822; }
|
||||
.CodeMirror {border: 1px solid #aaa;}
|
||||
</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="#">Breakpoint</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Breakpoint Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
gutters: ["CodeMirror-linenumbers", "breakpoints"]
|
||||
});
|
||||
editor.on("gutterClick", function(cm, n) {
|
||||
var info = cm.lineInfo(n);
|
||||
cm.setGutterMarker(n, "breakpoints", info.gutterMarkers ? null : makeMarker());
|
||||
});
|
||||
|
||||
function makeMarker() {
|
||||
var marker = document.createElement("div");
|
||||
marker.style.color = "#822";
|
||||
marker.innerHTML = "●";
|
||||
return marker;
|
||||
}
|
||||
</textarea></form>
|
||||
|
||||
<p>Click the line-number gutter to add or remove 'breakpoints'.</p>
|
||||
|
||||
<script>eval(document.getElementById("code").value);</script>
|
||||
|
||||
</article>
|
45
public/filemanager/scripts/CodeMirror/demo/markselection.html
vendored
Normal file
45
public/filemanager/scripts/CodeMirror/demo/markselection.html
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Match Selection 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/search/searchcursor.js"></script>
|
||||
<script src="../addon/selection/mark-selection.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
.CodeMirror-selected { background-color: blue !important; }
|
||||
.CodeMirror-selectedtext { color: white; }
|
||||
</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="#">Match Selection</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Match Selection Demo</h2>
|
||||
<form><textarea id="code" name="code">Select something from here.
|
||||
You'll see that the selection's foreground color changes to white!
|
||||
Since, by default, CodeMirror only puts an independent "marker" layer
|
||||
behind the text, you'll need something like this to change its colour.</textarea></form>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
styleSelectedText: true
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>Simple addon to easily mark (and style) selected text.</p>
|
||||
|
||||
</article>
|
47
public/filemanager/scripts/CodeMirror/demo/matchhighlighter.html
vendored
Normal file
47
public/filemanager/scripts/CodeMirror/demo/matchhighlighter.html
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Match Highlighter 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/search/searchcursor.js"></script>
|
||||
<script src="../addon/search/match-highlighter.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
.CodeMirror-focused .cm-matchhighlight {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
|
||||
background-position: bottom;
|
||||
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="#">Match Highlighter</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Match Highlighter Demo</h2>
|
||||
<form><textarea id="code" name="code">Select this text: hardToSpotVar
|
||||
And everywhere else in your code where hardToSpotVar appears will automatically illuminate.
|
||||
Give it a try! No more hardToSpotVars.</textarea></form>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
highlightSelectionMatches: {showToken: /\w/}
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>Search and highlight occurences of the selected text.</p>
|
||||
|
||||
</article>
|
49
public/filemanager/scripts/CodeMirror/demo/matchtags.html
vendored
Normal file
49
public/filemanager/scripts/CodeMirror/demo/matchtags.html
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Tag Matcher 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/fold/xml-fold.js"></script>
|
||||
<script src="../addon/edit/matchtags.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
</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="#">Tag Matcher</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Tag Matcher Demo</h2>
|
||||
|
||||
|
||||
<div id="editor"></div>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
editor = CodeMirror(document.getElementById("editor"), {
|
||||
value: "<html>\n " + document.documentElement.innerHTML + "\n</html>",
|
||||
mode: "text/html",
|
||||
matchTags: {bothTags: true},
|
||||
extraKeys: {"Ctrl-J": "toMatchingTag"}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<p>Put the cursor on or inside a pair of tags to highlight them.
|
||||
Press Ctrl-J to jump to the tag that matches the one under the
|
||||
cursor.</p>
|
||||
</article>
|
107
public/filemanager/scripts/CodeMirror/demo/merge.html
vendored
Normal file
107
public/filemanager/scripts/CodeMirror/demo/merge.html
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: merge view demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel=stylesheet href="../lib/codemirror.css">
|
||||
<link rel=stylesheet href="../addon/merge/merge.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<script src="../addon/merge/dep/diff_match_patch.js"></script>
|
||||
<script src="../addon/merge/merge.js"></script>
|
||||
<style>
|
||||
.CodeMirror { line-height: 1.2; }
|
||||
span.clicky {
|
||||
cursor: pointer;
|
||||
background: #d70;
|
||||
color: white;
|
||||
padding: 0 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
</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="#">merge view</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>merge view demo</h2>
|
||||
|
||||
|
||||
<div id=view></div>
|
||||
|
||||
<p>The <a href="../doc/manual.html#addon_merge"><code>merge</code></a>
|
||||
addon provides an interface for displaying and merging diffs,
|
||||
either <span class=clicky onclick="initUI(2)">two-way</span>
|
||||
or <span class=clicky onclick="initUI(3)">three-way</span>. The left
|
||||
(or center) pane is editable, and the differences with the other
|
||||
pane(s) are <span class=clicky onclick="toggleDifferences()">optionally</span> shown live as you edit it.</p>
|
||||
|
||||
<p>This addon depends on
|
||||
the <a href="https://code.google.com/p/google-diff-match-patch/">google-diff-match-patch</a>
|
||||
library to compute the diffs.</p>
|
||||
|
||||
<script>
|
||||
var value, orig1, orig2, dv, hilight= true;
|
||||
function initUI(panes) {
|
||||
if (value == null) return;
|
||||
var target = document.getElementById("view");
|
||||
target.innerHTML = "";
|
||||
dv = CodeMirror.MergeView(target, {
|
||||
value: value,
|
||||
origLeft: panes == 3 ? orig1 : null,
|
||||
orig: orig2,
|
||||
lineNumbers: true,
|
||||
mode: "text/html",
|
||||
highlightDifferences: hilight
|
||||
});
|
||||
}
|
||||
|
||||
function toggleDifferences() {
|
||||
dv.setShowDifferences(hilight = !hilight);
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
value = document.documentElement.innerHTML;
|
||||
orig1 = value.replace(/\.\.\//g, "codemirror/").replace("yellow", "orange");
|
||||
orig2 = value.replace(/\u003cscript/g, "\u003cscript type=text/javascript ")
|
||||
.replace("white", "purple;\n font: comic sans;\n text-decoration: underline;\n height: 15em");
|
||||
initUI(2);
|
||||
};
|
||||
|
||||
function mergeViewHeight(mergeView) {
|
||||
function editorHeight(editor) {
|
||||
if (!editor) return 0;
|
||||
return editor.getScrollInfo().height;
|
||||
}
|
||||
return Math.max(editorHeight(mergeView.leftOriginal()),
|
||||
editorHeight(mergeView.editor()),
|
||||
editorHeight(mergeView.rightOriginal()));
|
||||
}
|
||||
|
||||
function resize(mergeView) {
|
||||
var height = mergeViewHeight(mergeView);
|
||||
for(;;) {
|
||||
if (mergeView.leftOriginal())
|
||||
mergeView.leftOriginal().setSize(null, height);
|
||||
mergeView.editor().setSize(null, height);
|
||||
if (mergeView.rightOriginal())
|
||||
mergeView.rightOriginal().setSize(null, height);
|
||||
|
||||
var newHeight = mergeViewHeight(mergeView);
|
||||
if (newHeight >= height) break;
|
||||
else height = newHeight;
|
||||
}
|
||||
mergeView.wrap.style.height = height + "px";
|
||||
}
|
||||
</script>
|
||||
</article>
|
75
public/filemanager/scripts/CodeMirror/demo/multiplex.html
vendored
Normal file
75
public/filemanager/scripts/CodeMirror/demo/multiplex.html
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Multiplexing Parser 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/mode/multiplex.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border: 1px solid black;}
|
||||
.cm-delimit {color: #fa4;}
|
||||
</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="#">Multiplexing Parser</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Multiplexing Parser Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
<html>
|
||||
<body style="<<magic>>">
|
||||
<h1><< this is not <html >></h1>
|
||||
<<
|
||||
multiline
|
||||
not html
|
||||
at all : &amp; <link/>
|
||||
>>
|
||||
<p>this is html again</p>
|
||||
</body>
|
||||
</html>
|
||||
</textarea></form>
|
||||
|
||||
<script>
|
||||
CodeMirror.defineMode("demo", function(config) {
|
||||
return CodeMirror.multiplexingMode(
|
||||
CodeMirror.getMode(config, "text/html"),
|
||||
{open: "<<", close: ">>",
|
||||
mode: CodeMirror.getMode(config, "text/plain"),
|
||||
delimStyle: "delimit"}
|
||||
// .. more multiplexed styles can follow here
|
||||
);
|
||||
});
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
mode: "demo",
|
||||
lineNumbers: true,
|
||||
lineWrapping: true
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>Demonstration of a multiplexing mode, which, at certain
|
||||
boundary strings, switches to one or more inner modes. The out
|
||||
(HTML) mode does not get fed the content of the <code><<
|
||||
>></code> blocks. See
|
||||
the <a href="../doc/manual.html#addon_multiplex">manual</a> and
|
||||
the <a href="../addon/mode/multiplex.js">source</a> for more
|
||||
information.</p>
|
||||
|
||||
<p>
|
||||
<strong>Parsing/Highlighting Tests:</strong>
|
||||
<a href="../test/index.html#multiplexing_*">normal</a>,
|
||||
<a href="../test/index.html#verbose,multiplexing_*">verbose</a>.
|
||||
</p>
|
||||
|
||||
</article>
|
68
public/filemanager/scripts/CodeMirror/demo/mustache.html
vendored
Normal file
68
public/filemanager/scripts/CodeMirror/demo/mustache.html
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Overlay Parser 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/mode/overlay.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border: 1px solid black;}
|
||||
.cm-mustache {color: #0ca;}
|
||||
</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="#">Overlay Parser</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Overlay Parser Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
<html>
|
||||
<body>
|
||||
<h1>{{title}}</h1>
|
||||
<p>These are links to {{things}}:</p>
|
||||
<ul>{{#links}}
|
||||
<li><a href="{{url}}">{{text}}</a></li>
|
||||
{{/links}}</ul>
|
||||
</body>
|
||||
</html>
|
||||
</textarea></form>
|
||||
|
||||
<script>
|
||||
CodeMirror.defineMode("mustache", function(config, parserConfig) {
|
||||
var mustacheOverlay = {
|
||||
token: function(stream, state) {
|
||||
var ch;
|
||||
if (stream.match("{{")) {
|
||||
while ((ch = stream.next()) != null)
|
||||
if (ch == "}" && stream.next() == "}") break;
|
||||
stream.eat("}");
|
||||
return "mustache";
|
||||
}
|
||||
while (stream.next() != null && !stream.match("{{", false)) {}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
return CodeMirror.overlayMode(CodeMirror.getMode(config, parserConfig.backdrop || "text/html"), mustacheOverlay);
|
||||
});
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: "mustache"});
|
||||
</script>
|
||||
|
||||
<p>Demonstration of a mode that parses HTML, highlighting
|
||||
the <a href="http://mustache.github.com/">Mustache</a> templating
|
||||
directives inside of it by using the code
|
||||
in <a href="../addon/mode/overlay.js"><code>overlay.js</code></a>. View
|
||||
source to see the 15 lines of code needed to accomplish this.</p>
|
||||
|
||||
</article>
|
45
public/filemanager/scripts/CodeMirror/demo/placeholder.html
vendored
Normal file
45
public/filemanager/scripts/CodeMirror/demo/placeholder.html
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Placeholder 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/display/placeholder.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror { border: 1px solid silver; }
|
||||
.CodeMirror-empty { outline: 1px solid #c22; }
|
||||
.CodeMirror-empty.CodeMirror-focused { outline: none; }
|
||||
.CodeMirror pre.CodeMirror-placeholder { color: #999; }
|
||||
</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="#">Placeholder</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Placeholder demo</h2>
|
||||
<form><textarea id="code" name="code" placeholder="Code goes here..."></textarea></form>
|
||||
|
||||
<p>The <a href="../doc/manual.html#addon_placeholder">placeholder</a>
|
||||
plug-in adds an option <code>placeholder</code> that can be set to
|
||||
make text appear in the editor when it is empty and not focused.
|
||||
If the source textarea has a <code>placeholder</code> attribute,
|
||||
it will automatically be inherited.</p>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true
|
||||
});
|
||||
</script>
|
||||
|
||||
</article>
|
87
public/filemanager/scripts/CodeMirror/demo/preview.html
vendored
Normal file
87
public/filemanager/scripts/CodeMirror/demo/preview.html
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: HTML5 preview</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=../mode/xml/xml.js></script>
|
||||
<script src=../mode/javascript/javascript.js></script>
|
||||
<script src=../mode/css/css.js></script>
|
||||
<script src=../mode/htmlmixed/htmlmixed.js></script>
|
||||
<style type=text/css>
|
||||
.CodeMirror {
|
||||
float: left;
|
||||
width: 50%;
|
||||
border: 1px solid black;
|
||||
}
|
||||
iframe {
|
||||
width: 49%;
|
||||
float: left;
|
||||
height: 300px;
|
||||
border: 1px solid black;
|
||||
border-left: 0px;
|
||||
}
|
||||
</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="#">HTML5 preview</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>HTML5 preview</h2>
|
||||
|
||||
<textarea id=code name=code>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>HTML5 canvas demo</title>
|
||||
<style>p {font-family: monospace;}</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Canvas pane goes here:</p>
|
||||
<canvas id=pane width=300 height=200></canvas>
|
||||
<script>
|
||||
var canvas = document.getElementById('pane');
|
||||
var context = canvas.getContext('2d');
|
||||
|
||||
context.fillStyle = 'rgb(250,0,0)';
|
||||
context.fillRect(10, 10, 55, 50);
|
||||
|
||||
context.fillStyle = 'rgba(0, 0, 250, 0.5)';
|
||||
context.fillRect(30, 30, 55, 50);
|
||||
</script>
|
||||
</body>
|
||||
</html></textarea>
|
||||
<iframe id=preview></iframe>
|
||||
<script>
|
||||
var delay;
|
||||
// Initialize CodeMirror editor with a nice html5 canvas demo.
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
|
||||
mode: 'text/html'
|
||||
});
|
||||
editor.on("change", function() {
|
||||
clearTimeout(delay);
|
||||
delay = setTimeout(updatePreview, 300);
|
||||
});
|
||||
|
||||
function updatePreview() {
|
||||
var previewFrame = document.getElementById('preview');
|
||||
var preview = previewFrame.contentDocument || previewFrame.contentWindow.document;
|
||||
preview.open();
|
||||
preview.write(editor.getValue());
|
||||
preview.close();
|
||||
}
|
||||
setTimeout(updatePreview, 300);
|
||||
</script>
|
||||
</article>
|
58
public/filemanager/scripts/CodeMirror/demo/resize.html
vendored
Normal file
58
public/filemanager/scripts/CodeMirror/demo/resize.html
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Autoresize 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="../mode/css/css.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {
|
||||
border: 1px solid #eee;
|
||||
height: auto;
|
||||
}
|
||||
.CodeMirror-scroll {
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
}
|
||||
</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="#">Autoresize</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Autoresize Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
.CodeMirror {
|
||||
border: 1px solid #eee;
|
||||
height: auto;
|
||||
}
|
||||
.CodeMirror-scroll {
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
}
|
||||
</textarea></form>
|
||||
|
||||
<p>By setting a few CSS properties, and giving
|
||||
the <a href="../doc/manual.html#option_viewportMargin"><code>viewportMargin</code></a>
|
||||
a value of <code>Infinity</code>, CodeMirror can be made to
|
||||
automatically resize to fit its content.</p>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
viewportMargin: Infinity
|
||||
});
|
||||
</script>
|
||||
|
||||
</article>
|
54
public/filemanager/scripts/CodeMirror/demo/rulers.html
vendored
Normal file
54
public/filemanager/scripts/CodeMirror/demo/rulers.html
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Ruler 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/display/rulers.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid #888; border-bottom: 1px solid #888;}
|
||||
.ruler1 { border-left: 1px solid #fcc; }
|
||||
.ruler2 { border-left: 1px solid #f5f577; }
|
||||
.ruler3 { border-left: 1px solid #cfc; }
|
||||
.ruler4 { border-left: 1px solid #aff; }
|
||||
.ruler5 { border-left: 1px solid #ccf; }
|
||||
.ruler6 { border-left: 1px solid #fcf; }
|
||||
</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="#">Ruler demo</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Ruler Demo</h2>
|
||||
|
||||
<script type="text/javascript">
|
||||
var nums = "0123456789", space = " ";
|
||||
var rulers = [], value = "";
|
||||
for (var i = 1; i <= 6; i++) {
|
||||
rulers.push({className: "ruler" + i, column: i * 10});
|
||||
for (var j = 1; j < i; j++) value += space;
|
||||
value += nums + "\n";
|
||||
}
|
||||
var editor = CodeMirror(document.body.lastChild, {
|
||||
rulers: rulers,
|
||||
value: value + value + value,
|
||||
lineNumbers: true
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>Demonstration of
|
||||
the <a href="../doc/manual.html#addon_rulers">rulers</a> addon, which
|
||||
displays vertical lines at given column offsets.</p>
|
||||
|
||||
</article>
|
62
public/filemanager/scripts/CodeMirror/demo/runmode.html
vendored
Normal file
62
public/filemanager/scripts/CodeMirror/demo/runmode.html
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Mode Runner 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/runmode/runmode.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<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="#">Mode Runner</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Mode Runner Demo</h2>
|
||||
|
||||
|
||||
<textarea id="code" style="width: 90%; height: 7em; border: 1px solid black; padding: .2em .4em;">
|
||||
<foobar>
|
||||
<blah>Enter your xml here and press the button below to display
|
||||
it as highlighted by the CodeMirror XML mode</blah>
|
||||
<tag2 foo="2" bar="&quot;bar&quot;"/>
|
||||
</foobar></textarea><br>
|
||||
<button onclick="doHighlight();">Highlight!</button>
|
||||
<pre id="output" class="cm-s-default"></pre>
|
||||
|
||||
<script>
|
||||
function doHighlight() {
|
||||
CodeMirror.runMode(document.getElementById("code").value, "application/xml",
|
||||
document.getElementById("output"));
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>Running a CodeMirror mode outside of the editor.
|
||||
The <code>CodeMirror.runMode</code> function, defined
|
||||
in <code><a href="../addon/runmode/runmode.js">lib/runmode.js</a></code> takes the following arguments:</p>
|
||||
|
||||
<dl>
|
||||
<dt><code>text (string)</code></dt>
|
||||
<dd>The document to run through the highlighter.</dd>
|
||||
<dt><code>mode (<a href="../doc/manual.html#option_mode">mode spec</a>)</code></dt>
|
||||
<dd>The mode to use (must be loaded as normal).</dd>
|
||||
<dt><code>output (function or DOM node)</code></dt>
|
||||
<dd>If this is a function, it will be called for each token with
|
||||
two arguments, the token's text and the token's style class (may
|
||||
be <code>null</code> for unstyled tokens). If it is a DOM node,
|
||||
the tokens will be converted to <code>span</code> elements as in
|
||||
an editor, and inserted into the node
|
||||
(through <code>innerHTML</code>).</dd>
|
||||
</dl>
|
||||
|
||||
</article>
|
87
public/filemanager/scripts/CodeMirror/demo/search.html
vendored
Normal file
87
public/filemanager/scripts/CodeMirror/demo/search.html
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Search/Replace Demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/dialog/dialog.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<script src="../addon/dialog/dialog.js"></script>
|
||||
<script src="../addon/search/searchcursor.js"></script>
|
||||
<script src="../addon/search/search.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
dt {font-family: monospace; color: #666;}
|
||||
</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="#">Search/Replace</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Search/Replace Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
<dl>
|
||||
<dt id="option_indentWithTabs"><code><strong>indentWithTabs</strong>: boolean</code></dt>
|
||||
<dd>Whether, when indenting, the first N*<code>tabSize</code>
|
||||
spaces should be replaced by N tabs. Default is false.</dd>
|
||||
|
||||
<dt id="option_electricChars"><code><strong>electricChars</strong>: boolean</code></dt>
|
||||
<dd>Configures whether the editor should re-indent the current
|
||||
line when a character is typed that might change its proper
|
||||
indentation (only works if the mode supports indentation).
|
||||
Default is true.</dd>
|
||||
|
||||
<dt id="option_specialChars"><code><strong>specialChars</strong>: RegExp</code></dt>
|
||||
<dd>A regular expression used to determine which characters
|
||||
should be replaced by a
|
||||
special <a href="#option_specialCharPlaceholder">placeholder</a>.
|
||||
Mostly useful for non-printing special characters. The default
|
||||
is <code>/[\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/</code>.</dd>
|
||||
<dt id="option_specialCharPlaceholder"><code><strong>specialCharPlaceholder</strong>: function(char) → Element</code></dt>
|
||||
<dd>A function that, given a special character identified by
|
||||
the <a href="#option_specialChars"><code>specialChars</code></a>
|
||||
option, produces a DOM node that is used to represent the
|
||||
character. By default, a red dot (<span style="color: red">•</span>)
|
||||
is shown, with a title tooltip to indicate the character code.</dd>
|
||||
|
||||
<dt id="option_rtlMoveVisually"><code><strong>rtlMoveVisually</strong>: boolean</code></dt>
|
||||
<dd>Determines whether horizontal cursor movement through
|
||||
right-to-left (Arabic, Hebrew) text is visual (pressing the left
|
||||
arrow moves the cursor left) or logical (pressing the left arrow
|
||||
moves to the next lower index in the string, which is visually
|
||||
right in right-to-left text). The default is <code>false</code>
|
||||
on Windows, and <code>true</code> on other platforms.</dd>
|
||||
</dl>
|
||||
</textarea></form>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: "text/html", lineNumbers: true});
|
||||
</script>
|
||||
|
||||
<p>Demonstration of primitive search/replace functionality. The
|
||||
keybindings (which can be overridden by custom keymaps) are:</p>
|
||||
<dl>
|
||||
<dt>Ctrl-F / Cmd-F</dt><dd>Start searching</dd>
|
||||
<dt>Ctrl-G / Cmd-G</dt><dd>Find next</dd>
|
||||
<dt>Shift-Ctrl-G / Shift-Cmd-G</dt><dd>Find previous</dd>
|
||||
<dt>Shift-Ctrl-F / Cmd-Option-F</dt><dd>Replace</dd>
|
||||
<dt>Shift-Ctrl-R / Shift-Cmd-Option-F</dt><dd>Replace all</dd>
|
||||
</dl>
|
||||
<p>Searching is enabled by
|
||||
including <a href="../addon/search/search.js">addon/search/search.js</a>
|
||||
and <a href="../addon/search/searchcursor.js">addon/search/searchcursor.js</a>.
|
||||
For good-looking input dialogs, you also want to include
|
||||
<a href="../addon/dialog/dialog.js">addon/dialog/dialog.js</a>
|
||||
and <a href="../addon/dialog/dialog.css">addon/dialog/dialog.css</a>.</p>
|
||||
</article>
|
85
public/filemanager/scripts/CodeMirror/demo/spanaffectswrapping_shim.html
vendored
Normal file
85
public/filemanager/scripts/CodeMirror/demo/spanaffectswrapping_shim.html
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Automatically derive odd wrapping behavior for your browser</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<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="#">Automatically derive odd wrapping behavior for your browser</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Automatically derive odd wrapping behavior for your browser</h2>
|
||||
|
||||
|
||||
<p>This is a hack to automatically derive
|
||||
a <code>spanAffectsWrapping</code> regexp for a browser. See the
|
||||
comments above that variable
|
||||
in <a href="../lib/codemirror.js"><code>lib/codemirror.js</code></a>
|
||||
for some more details.</p>
|
||||
|
||||
<div style="white-space: pre-wrap; width: 50px;" id="area"></div>
|
||||
<pre id="output"></pre>
|
||||
|
||||
<script id="script">
|
||||
var a = document.getElementById("area"), bad = Object.create(null);
|
||||
var chars = "a~`!@#$%^&*()-_=+}{[]\\|'\"/?.>,<:;", l = chars.length;
|
||||
for (var x = 0; x < l; ++x) for (var y = 0; y < l; ++y) {
|
||||
var s1 = "foooo" + chars.charAt(x), s2 = chars.charAt(y) + "br";
|
||||
a.appendChild(document.createTextNode(s1 + s2));
|
||||
var h1 = a.offsetHeight;
|
||||
a.innerHTML = "";
|
||||
a.appendChild(document.createElement("span")).appendChild(document.createTextNode(s1));
|
||||
a.appendChild(document.createElement("span")).appendChild(document.createTextNode(s2));
|
||||
if (a.offsetHeight != h1)
|
||||
bad[chars.charAt(x)] = (bad[chars.charAt(x)] || "") + chars.charAt(y);
|
||||
a.innerHTML = "";
|
||||
}
|
||||
|
||||
var re = "";
|
||||
function toREElt(str) {
|
||||
if (str.length > 1) {
|
||||
var invert = false;
|
||||
if (str.length > chars.length * .6) {
|
||||
invert = true;
|
||||
var newStr = "";
|
||||
for (var i = 0; i < l; ++i) if (str.indexOf(chars.charAt(i)) == -1) newStr += chars.charAt(i);
|
||||
str = newStr;
|
||||
}
|
||||
str = str.replace(/[\-\.\]\"\'\\\/\^a]/g, function(orig) { return orig == "a" ? "\\w" : "\\" + orig; });
|
||||
return "[" + (invert ? "^" : "") + str + "]";
|
||||
} else if (str == "a") {
|
||||
return "\\w";
|
||||
} else if (/[?$*()+{}[\]\.|/\'\"]/.test(str)) {
|
||||
return "\\" + str;
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
var newRE = "";
|
||||
for (;;) {
|
||||
var left = null;
|
||||
for (var left in bad) break;
|
||||
if (left == null) break;
|
||||
var right = bad[left];
|
||||
delete bad[left];
|
||||
for (var other in bad) if (bad[other] == right) {
|
||||
left += other;
|
||||
delete bad[other];
|
||||
}
|
||||
newRE += (newRE ? "|" : "") + toREElt(left) + toREElt(right);
|
||||
}
|
||||
|
||||
document.getElementById("output").appendChild(document.createTextNode("Your regexp is: " + (newRE || "^$")));
|
||||
</script>
|
||||
</article>
|
79
public/filemanager/scripts/CodeMirror/demo/sublime.html
vendored
Normal file
79
public/filemanager/scripts/CodeMirror/demo/sublime.html
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Sublime Text bindings demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/fold/foldgutter.css">
|
||||
<link rel="stylesheet" href="../addon/dialog/dialog.css">
|
||||
<link rel="stylesheet" href="../theme/monokai.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../addon/search/searchcursor.js"></script>
|
||||
<script src="../addon/search/search.js"></script>
|
||||
<script src="../addon/dialog/dialog.js"></script>
|
||||
<script src="../addon/edit/matchbrackets.js"></script>
|
||||
<script src="../addon/edit/closebrackets.js"></script>
|
||||
<script src="../addon/comment/comment.js"></script>
|
||||
<script src="../addon/wrap/hardwrap.js"></script>
|
||||
<script src="../addon/fold/foldcode.js"></script>
|
||||
<script src="../addon/fold/brace-fold.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
<script src="../keymap/sublime.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee; line-height: 1.3; height: 500px}
|
||||
.CodeMirror-linenumbers { padding: 0 8px; }
|
||||
</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="#">Sublime bindings</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Sublime Text bindings demo</h2>
|
||||
|
||||
<p>The <code>sublime</code> keymap defines many Sublime Text-specific
|
||||
bindings for CodeMirror. See the code below for an overview.</p>
|
||||
|
||||
<p>Enable the keymap by
|
||||
loading <a href="../keymap/sublime.js"><code>keymap/sublime.js</code></a>
|
||||
and setting
|
||||
the <a href="../doc/manual.html#option_keyMap"><code>keyMap</code></a>
|
||||
option to <code>"sublime"</code>.</p>
|
||||
|
||||
<p>(A lot of the search functionality is still missing.)
|
||||
|
||||
<script>
|
||||
var value = "// The bindings defined specifically in the Sublime Text mode\nvar bindings = {\n";
|
||||
var map = CodeMirror.keyMap.sublime, mapK = CodeMirror.keyMap["sublime-Ctrl-K"];
|
||||
for (var key in map) {
|
||||
if (key != "Ctrl-K" && key != "fallthrough" && (!/find/.test(map[key]) || /findUnder/.test(map[key])))
|
||||
value += " \"" + key + "\": \"" + map[key] + "\",\n";
|
||||
}
|
||||
for (var key in mapK) {
|
||||
if (key != "auto" && key != "nofallthrough")
|
||||
value += " \"Ctrl-K " + key + "\": \"" + mapK[key] + "\",\n";
|
||||
}
|
||||
value += "}\n\n// The implementation of joinLines\n";
|
||||
value += CodeMirror.commands.joinLines.toString().replace(/^function\s*\(/, "function joinLines(").replace(/\n /g, "\n") + "\n";
|
||||
var editor = CodeMirror(document.body.getElementsByTagName("article")[0], {
|
||||
value: value,
|
||||
lineNumbers: true,
|
||||
mode: "javascript",
|
||||
keyMap: "sublime",
|
||||
autoCloseBrackets: true,
|
||||
matchBrackets: true,
|
||||
showCursorWhenSelecting: true,
|
||||
theme: "monokai"
|
||||
});
|
||||
</script>
|
||||
|
||||
</article>
|
131
public/filemanager/scripts/CodeMirror/demo/tern.html
vendored
Normal file
131
public/filemanager/scripts/CodeMirror/demo/tern.html
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Tern Demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/dialog/dialog.css">
|
||||
<link rel="stylesheet" href="../addon/hint/show-hint.css">
|
||||
<link rel="stylesheet" href="../addon/tern/tern.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
<script src="../addon/dialog/dialog.js"></script>
|
||||
<script src="../addon/hint/show-hint.js"></script>
|
||||
<script src="../addon/tern/tern.js"></script>
|
||||
<script src="http://marijnhaverbeke.nl/acorn/acorn.js"></script>
|
||||
<script src="http://marijnhaverbeke.nl/acorn/acorn_loose.js"></script>
|
||||
<script src="http://marijnhaverbeke.nl/acorn/util/walk.js"></script>
|
||||
<script src="http://ternjs.net/doc/demo/polyfill.js"></script>
|
||||
<script src="http://ternjs.net/lib/signal.js"></script>
|
||||
<script src="http://ternjs.net/lib/tern.js"></script>
|
||||
<script src="http://ternjs.net/lib/def.js"></script>
|
||||
<script src="http://ternjs.net/lib/comment.js"></script>
|
||||
<script src="http://ternjs.net/lib/infer.js"></script>
|
||||
<script src="http://ternjs.net/plugin/doc_comment.js"></script>
|
||||
<style>
|
||||
.CodeMirror {border: 1px solid #ddd;}
|
||||
</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="#">Tern</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Tern Demo</h2>
|
||||
<form><textarea id="code" name="code">// Use ctrl-space to complete something
|
||||
// Put the cursor in or after an expression, press ctrl-i to
|
||||
// find its type
|
||||
|
||||
var foo = ["array", "of", "strings"];
|
||||
var bar = foo.slice(0, 2).join("").split("a")[0];
|
||||
|
||||
// Works for locally defined types too.
|
||||
|
||||
function CTor() { this.size = 10; }
|
||||
CTor.prototype.hallo = "hallo";
|
||||
|
||||
var baz = new CTor;
|
||||
baz.
|
||||
|
||||
// You can press ctrl-q when the cursor is on a variable name to
|
||||
// rename it. Try it with CTor...
|
||||
|
||||
// When the cursor is in an argument list, the arguments are
|
||||
// shown below the editor.
|
||||
|
||||
[1].reduce( );
|
||||
|
||||
// And a little more advanced code...
|
||||
|
||||
(function(exports) {
|
||||
exports.randomElt = function(arr) {
|
||||
return arr[Math.floor(arr.length * Math.random())];
|
||||
};
|
||||
exports.strList = "foo".split("");
|
||||
exports.intList = exports.strList.map(function(s) { return s.charCodeAt(0); });
|
||||
})(window.myMod = {});
|
||||
|
||||
var randomStr = myMod.randomElt(myMod.strList);
|
||||
var randomInt = myMod.randomElt(myMod.intList);
|
||||
</textarea></p>
|
||||
|
||||
<p>Demonstrates integration of <a href="http://ternjs.net/">Tern</a>
|
||||
and CodeMirror. The following keys are bound:</p>
|
||||
|
||||
<dl>
|
||||
<dt>Ctrl-Space</dt><dd>Autocomplete</dd>
|
||||
<dt>Ctrl-I</dt><dd>Find type at cursor</dd>
|
||||
<dt>Alt-.</dt><dd>Jump to definition (Alt-, to jump back)</dd>
|
||||
<dt>Ctrl-Q</dt><dd>Rename variable</dd>
|
||||
<dt>Ctrl-.</dt><dd>Select all occurrences of a variable</dd>
|
||||
</dl>
|
||||
|
||||
<p>Documentation is sparse for now. See the top of
|
||||
the <a href="../addon/tern/tern.js">script</a> for a rough API
|
||||
overview.</p>
|
||||
|
||||
<script>
|
||||
function getURL(url, c) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("get", url, true);
|
||||
xhr.send();
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState != 4) return;
|
||||
if (xhr.status < 400) return c(null, xhr.responseText);
|
||||
var e = new Error(xhr.responseText || "No response");
|
||||
e.status = xhr.status;
|
||||
c(e);
|
||||
};
|
||||
}
|
||||
|
||||
var server;
|
||||
getURL("http://ternjs.net/defs/ecma5.json", function(err, code) {
|
||||
if (err) throw new Error("Request for ecma5.json: " + err);
|
||||
server = new CodeMirror.TernServer({defs: [JSON.parse(code)]});
|
||||
editor.setOption("extraKeys", {
|
||||
"Ctrl-Space": function(cm) { server.complete(cm); },
|
||||
"Ctrl-I": function(cm) { server.showType(cm); },
|
||||
"Alt-.": function(cm) { server.jumpToDef(cm); },
|
||||
"Alt-,": function(cm) { server.jumpBack(cm); },
|
||||
"Ctrl-Q": function(cm) { server.rename(cm); },
|
||||
"Ctrl-.": function(cm) { server.selectName(cm); }
|
||||
})
|
||||
editor.on("cursorActivity", function(cm) { server.updateArgHints(cm); });
|
||||
});
|
||||
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
mode: "javascript"
|
||||
});
|
||||
</script>
|
||||
|
||||
</article>
|
124
public/filemanager/scripts/CodeMirror/demo/theme.html
vendored
Normal file
124
public/filemanager/scripts/CodeMirror/demo/theme.html
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Theme Demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../theme/3024-day.css">
|
||||
<link rel="stylesheet" href="../theme/3024-night.css">
|
||||
<link rel="stylesheet" href="../theme/ambiance.css">
|
||||
<link rel="stylesheet" href="../theme/base16-dark.css">
|
||||
<link rel="stylesheet" href="../theme/base16-light.css">
|
||||
<link rel="stylesheet" href="../theme/blackboard.css">
|
||||
<link rel="stylesheet" href="../theme/cobalt.css">
|
||||
<link rel="stylesheet" href="../theme/eclipse.css">
|
||||
<link rel="stylesheet" href="../theme/elegant.css">
|
||||
<link rel="stylesheet" href="../theme/erlang-dark.css">
|
||||
<link rel="stylesheet" href="../theme/lesser-dark.css">
|
||||
<link rel="stylesheet" href="../theme/mbo.css">
|
||||
<link rel="stylesheet" href="../theme/mdn-like.css">
|
||||
<link rel="stylesheet" href="../theme/midnight.css">
|
||||
<link rel="stylesheet" href="../theme/monokai.css">
|
||||
<link rel="stylesheet" href="../theme/neat.css">
|
||||
<link rel="stylesheet" href="../theme/night.css">
|
||||
<link rel="stylesheet" href="../theme/paraiso-dark.css">
|
||||
<link rel="stylesheet" href="../theme/paraiso-light.css">
|
||||
<link rel="stylesheet" href="../theme/pastel-on-dark.css">
|
||||
<link rel="stylesheet" href="../theme/rubyblue.css">
|
||||
<link rel="stylesheet" href="../theme/solarized.css">
|
||||
<link rel="stylesheet" href="../theme/the-matrix.css">
|
||||
<link rel="stylesheet" href="../theme/tomorrow-night-eighties.css">
|
||||
<link rel="stylesheet" href="../theme/twilight.css">
|
||||
<link rel="stylesheet" href="../theme/vibrant-ink.css">
|
||||
<link rel="stylesheet" href="../theme/xq-dark.css">
|
||||
<link rel="stylesheet" href="../theme/xq-light.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../mode/javascript/javascript.js"></script>
|
||||
<script src="../addon/selection/active-line.js"></script>
|
||||
<script src="../addon/edit/matchbrackets.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border: 1px solid black; font-size:13px}
|
||||
</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="#">Theme</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Theme Demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
function findSequence(goal) {
|
||||
function find(start, history) {
|
||||
if (start == goal)
|
||||
return history;
|
||||
else if (start > goal)
|
||||
return null;
|
||||
else
|
||||
return find(start + 5, "(" + history + " + 5)") ||
|
||||
find(start * 3, "(" + history + " * 3)");
|
||||
}
|
||||
return find(1, "1");
|
||||
}</textarea></form>
|
||||
|
||||
<p>Select a theme: <select onchange="selectTheme()" id=select>
|
||||
<option selected>default</option>
|
||||
<option>3024-day</option>
|
||||
<option>3024-night</option>
|
||||
<option>ambiance</option>
|
||||
<option>base16-dark</option>
|
||||
<option>base16-light</option>
|
||||
<option>blackboard</option>
|
||||
<option>cobalt</option>
|
||||
<option>eclipse</option>
|
||||
<option>elegant</option>
|
||||
<option>erlang-dark</option>
|
||||
<option>lesser-dark</option>
|
||||
<option>mbo</option>
|
||||
<option>mdn-like</option>
|
||||
<option>midnight</option>
|
||||
<option>monokai</option>
|
||||
<option>neat</option>
|
||||
<option>night</option>
|
||||
<option>paraiso-dark</option>
|
||||
<option>paraiso-light</option>
|
||||
<option>pastel-on-dark</option>
|
||||
<option>rubyblue</option>
|
||||
<option>solarized dark</option>
|
||||
<option>solarized light</option>
|
||||
<option>the-matrix</option>
|
||||
<option>tomorrow-night-eighties</option>
|
||||
<option>twilight</option>
|
||||
<option>vibrant-ink</option>
|
||||
<option>xq-dark</option>
|
||||
<option>xq-light</option>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
styleActiveLine: true,
|
||||
matchBrackets: true
|
||||
});
|
||||
var input = document.getElementById("select");
|
||||
function selectTheme() {
|
||||
var theme = input.options[input.selectedIndex].innerHTML;
|
||||
editor.setOption("theme", theme);
|
||||
}
|
||||
var choice = document.location.search &&
|
||||
decodeURIComponent(document.location.search.slice(1));
|
||||
if (choice) {
|
||||
input.value = choice;
|
||||
editor.setOption("theme", choice);
|
||||
}
|
||||
</script>
|
||||
</article>
|
48
public/filemanager/scripts/CodeMirror/demo/trailingspace.html
vendored
Normal file
48
public/filemanager/scripts/CodeMirror/demo/trailingspace.html
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<!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>
|
67
public/filemanager/scripts/CodeMirror/demo/variableheight.html
vendored
Normal file
67
public/filemanager/scripts/CodeMirror/demo/variableheight.html
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Variable Height 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="../mode/markdown/markdown.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border: 1px solid silver; border-width: 1px 2px; }
|
||||
.cm-header { font-family: arial; }
|
||||
.cm-header-1 { font-size: 150%; }
|
||||
.cm-header-2 { font-size: 130%; }
|
||||
.cm-header-3 { font-size: 120%; }
|
||||
.cm-header-4 { font-size: 110%; }
|
||||
.cm-header-5 { font-size: 100%; }
|
||||
.cm-header-6 { font-size: 90%; }
|
||||
.cm-strong { font-size: 140%; }
|
||||
</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="#">Variable Height</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Variable Height Demo</h2>
|
||||
<form><textarea id="code" name="code"># A First Level Header
|
||||
|
||||
**Bold** text in a normal-size paragraph.
|
||||
|
||||
And a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long, wrapped line with a piece of **big** text inside of it.
|
||||
|
||||
## A Second Level Header
|
||||
|
||||
Now is the time for all good men to come to
|
||||
the aid of their country. This is just a
|
||||
regular paragraph.
|
||||
|
||||
The quick brown fox jumped over the lazy
|
||||
dog's back.
|
||||
|
||||
### Header 3
|
||||
|
||||
> This is a blockquote.
|
||||
>
|
||||
> This is the second paragraph in the blockquote.
|
||||
>
|
||||
> ## This is an H2 in a blockquote
|
||||
</textarea></form>
|
||||
<script id="script">
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
mode: "markdown"
|
||||
});
|
||||
</script>
|
||||
</article>
|
80
public/filemanager/scripts/CodeMirror/demo/vim.html
vendored
Normal file
80
public/filemanager/scripts/CodeMirror/demo/vim.html
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Vim bindings demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/dialog/dialog.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../addon/dialog/dialog.js"></script>
|
||||
<script src="../addon/search/searchcursor.js"></script>
|
||||
<script src="../mode/clike/clike.js"></script>
|
||||
<script src="../addon/edit/matchbrackets.js"></script>
|
||||
<script src="../keymap/vim.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee;}
|
||||
</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="#">Vim bindings</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Vim bindings demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
#include "syscalls.h"
|
||||
/* getchar: simple buffered version */
|
||||
int getchar(void)
|
||||
{
|
||||
static char buf[BUFSIZ];
|
||||
static char *bufp = buf;
|
||||
static int n = 0;
|
||||
if (n == 0) { /* buffer is empty */
|
||||
n = read(0, buf, sizeof buf);
|
||||
bufp = buf;
|
||||
}
|
||||
return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
|
||||
}
|
||||
</textarea></form>
|
||||
|
||||
<form><textarea id="code2" name="code2">
|
||||
I am another file! You can yank from my neighbor and paste here.
|
||||
</textarea></form>
|
||||
|
||||
<p>The vim keybindings are enabled by
|
||||
including <a href="../keymap/vim.js">keymap/vim.js</a> and setting
|
||||
the <code>vimMode</code> option to <code>true</code>. This will also
|
||||
automatically change the <code>keyMap</code> option to <code>"vim"</code>.</p>
|
||||
|
||||
<p>Note that while the vim mode tries to emulate the most useful features of
|
||||
vim as faithfully as possible, it does not strive to become a complete vim
|
||||
implementation</p>
|
||||
|
||||
<script>
|
||||
CodeMirror.commands.save = function(){ alert("Saving"); };
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
mode: "text/x-csrc",
|
||||
vimMode: true,
|
||||
matchBrackets: true,
|
||||
showCursorWhenSelecting: true
|
||||
});
|
||||
var editor2 = CodeMirror.fromTextArea(document.getElementById("code2"), {
|
||||
lineNumbers: true,
|
||||
mode: "text/x-csrc",
|
||||
vimMode: true,
|
||||
matchBrackets: true,
|
||||
showCursorWhenSelecting: true
|
||||
});
|
||||
</script>
|
||||
|
||||
</article>
|
62
public/filemanager/scripts/CodeMirror/demo/visibletabs.html
vendored
Normal file
62
public/filemanager/scripts/CodeMirror/demo/visibletabs.html
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Visible tabs 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="../mode/clike/clike.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee;}
|
||||
.cm-tab {
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
|
||||
background-position: right;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
</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="#">Visible tabs</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Visible tabs demo</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
#include "syscalls.h"
|
||||
/* getchar: simple buffered version */
|
||||
int getchar(void)
|
||||
{
|
||||
static char buf[BUFSIZ];
|
||||
static char *bufp = buf;
|
||||
static int n = 0;
|
||||
if (n == 0) { /* buffer is empty */
|
||||
n = read(0, buf, sizeof buf);
|
||||
bufp = buf;
|
||||
}
|
||||
return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
|
||||
}
|
||||
</textarea></form>
|
||||
|
||||
<p>Tabs inside the editor are spans with the
|
||||
class <code>cm-tab</code>, and can be styled.</p>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
tabSize: 4,
|
||||
indentUnit: 4,
|
||||
indentWithTabs: true,
|
||||
mode: "text/x-csrc"
|
||||
});
|
||||
</script>
|
||||
|
||||
</article>
|
85
public/filemanager/scripts/CodeMirror/demo/widget.html
vendored
Normal file
85
public/filemanager/scripts/CodeMirror/demo/widget.html
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Inline Widget 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="../mode/javascript/javascript.js"></script>
|
||||
<script src="http://ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror {border: 1px solid black;}
|
||||
.lint-error {font-family: arial; font-size: 70%; background: #ffa; color: #a00; padding: 2px 5px 3px; }
|
||||
.lint-error-icon {color: white; background-color: red; font-weight: bold; border-radius: 50%; padding: 0 3px; margin-right: 7px;}
|
||||
</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="#">Inline Widget</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Inline Widget Demo</h2>
|
||||
|
||||
|
||||
<div id=code></div>
|
||||
<script id="script">var widgets = []
|
||||
function updateHints() {
|
||||
editor.operation(function(){
|
||||
for (var i = 0; i < widgets.length; ++i)
|
||||
editor.removeLineWidget(widgets[i]);
|
||||
widgets.length = 0;
|
||||
|
||||
JSHINT(editor.getValue());
|
||||
for (var i = 0; i < JSHINT.errors.length; ++i) {
|
||||
var err = JSHINT.errors[i];
|
||||
if (!err) continue;
|
||||
var msg = document.createElement("div");
|
||||
var icon = msg.appendChild(document.createElement("span"));
|
||||
icon.innerHTML = "!!";
|
||||
icon.className = "lint-error-icon";
|
||||
msg.appendChild(document.createTextNode(err.reason));
|
||||
msg.className = "lint-error";
|
||||
widgets.push(editor.addLineWidget(err.line - 1, msg, {coverGutter: false, noHScroll: true}));
|
||||
}
|
||||
});
|
||||
var info = editor.getScrollInfo();
|
||||
var after = editor.charCoords({line: editor.getCursor().line + 1, ch: 0}, "local").top;
|
||||
if (info.top + info.clientHeight < after)
|
||||
editor.scrollTo(null, after - info.clientHeight + 3);
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
var sc = document.getElementById("script");
|
||||
var content = sc.textContent || sc.innerText || sc.innerHTML;
|
||||
|
||||
window.editor = CodeMirror(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
mode: "javascript",
|
||||
value: content
|
||||
});
|
||||
|
||||
var waiting;
|
||||
editor.on("change", function() {
|
||||
clearTimeout(waiting);
|
||||
waiting = setTimeout(updateHints, 500);
|
||||
});
|
||||
|
||||
setTimeout(updateHints, 100);
|
||||
};
|
||||
|
||||
"long line to create a horizontal scrollbar, in order to test whether the (non-inline) widgets stay in place when scrolling to the right";
|
||||
</script>
|
||||
<p>This demo runs <a href="http://jshint.com">JSHint</a> over the code
|
||||
in the editor (which is the script used on this page), and
|
||||
inserts <a href="../doc/manual.html#addLineWidget">line widgets</a> to
|
||||
display the warnings that JSHint comes up with.</p>
|
||||
</article>
|
116
public/filemanager/scripts/CodeMirror/demo/xmlcomplete.html
vendored
Normal file
116
public/filemanager/scripts/CodeMirror/demo/xmlcomplete.html
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: XML Autocomplete Demo</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../addon/hint/show-hint.css">
|
||||
<script src="../lib/codemirror.js"></script>
|
||||
<script src="../addon/hint/show-hint.js"></script>
|
||||
<script src="../addon/hint/xml-hint.js"></script>
|
||||
<script src="../mode/xml/xml.js"></script>
|
||||
<style type="text/css">
|
||||
.CodeMirror { border: 1px solid #eee; }
|
||||
</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="#">XML Autocomplete</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>XML Autocomplete Demo</h2>
|
||||
<form><textarea id="code" name="code"><!-- write some xml below -->
|
||||
</textarea></form>
|
||||
|
||||
<p>Press <strong>ctrl-space</strong>, or type a '<' character to
|
||||
activate autocompletion. This demo defines a simple schema that
|
||||
guides completion. The schema can be customized—see
|
||||
the <a href="../doc/manual.html#addon_xml-hint">manual</a>.</p>
|
||||
|
||||
<p>Development of the <code>xml-hint</code> addon was kindly
|
||||
sponsored
|
||||
by <a href="http://www.xperiment.mobi">www.xperiment.mobi</a>.</p>
|
||||
|
||||
<script>
|
||||
var dummy = {
|
||||
attrs: {
|
||||
color: ["red", "green", "blue", "purple", "white", "black", "yellow"],
|
||||
size: ["large", "medium", "small"],
|
||||
description: null
|
||||
},
|
||||
children: []
|
||||
};
|
||||
|
||||
var tags = {
|
||||
"!top": ["top"],
|
||||
top: {
|
||||
attrs: {
|
||||
lang: ["en", "de", "fr", "nl"],
|
||||
freeform: null
|
||||
},
|
||||
children: ["animal", "plant"]
|
||||
},
|
||||
animal: {
|
||||
attrs: {
|
||||
name: null,
|
||||
isduck: ["yes", "no"]
|
||||
},
|
||||
children: ["wings", "feet", "body", "head", "tail"]
|
||||
},
|
||||
plant: {
|
||||
attrs: {name: null},
|
||||
children: ["leaves", "stem", "flowers"]
|
||||
},
|
||||
wings: dummy, feet: dummy, body: dummy, head: dummy, tail: dummy,
|
||||
leaves: dummy, stem: dummy, flowers: dummy
|
||||
};
|
||||
|
||||
function completeAfter(cm, pred) {
|
||||
var cur = cm.getCursor();
|
||||
if (!pred || pred()) setTimeout(function() {
|
||||
if (!cm.state.completionActive)
|
||||
CodeMirror.showHint(cm, CodeMirror.hint.xml, {schemaInfo: tags, completeSingle: false});
|
||||
}, 100);
|
||||
return CodeMirror.Pass;
|
||||
}
|
||||
|
||||
function completeIfAfterLt(cm) {
|
||||
return completeAfter(cm, function() {
|
||||
var cur = cm.getCursor();
|
||||
return cm.getRange(CodeMirror.Pos(cur.line, cur.ch - 1), cur) == "<";
|
||||
});
|
||||
}
|
||||
|
||||
function completeIfInTag(cm) {
|
||||
return completeAfter(cm, function() {
|
||||
var tok = cm.getTokenAt(cm.getCursor());
|
||||
if (tok.type == "string" && (!/['"]/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1)) return false;
|
||||
var inner = CodeMirror.innerMode(cm.getMode(), tok.state).state;
|
||||
return inner.tagName;
|
||||
});
|
||||
}
|
||||
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
mode: "xml",
|
||||
lineNumbers: true,
|
||||
extraKeys: {
|
||||
"'<'": completeAfter,
|
||||
"'/'": completeIfAfterLt,
|
||||
"' '": completeIfInTag,
|
||||
"'='": completeIfInTag,
|
||||
"Ctrl-Space": function(cm) {
|
||||
CodeMirror.showHint(cm, CodeMirror.hint.xml, {schemaInfo: tags});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</article>
|
Reference in New Issue
Block a user