package
This commit is contained in:
parent
6a6c4c4c15
commit
96b6abb615
23 changed files with 141 additions and 125 deletions
|
|
@ -131,6 +131,12 @@ To package Ace we use the dryice build tool developed by the Mozilla Skywriter t
|
|||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Make sure you at least version 0.3.0 of dryice
|
||||
|
||||
```bash
|
||||
npm install dryice
|
||||
```
|
||||
|
||||
Afterwards Ace can be built by calling
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@ var _define = function(module, deps, payload) {
|
|||
if (arguments.length == 2)
|
||||
payload = deps;
|
||||
|
||||
if (!define.modules)
|
||||
define.modules = {};
|
||||
if (!_define.modules)
|
||||
_define.modules = {};
|
||||
|
||||
define.modules[module] = payload;
|
||||
_define.modules[module] = payload;
|
||||
};
|
||||
if (global.define)
|
||||
_define.original = global.define;
|
||||
|
|
@ -146,7 +146,7 @@ var lookup = function(parentId, moduleName) {
|
|||
|
||||
moduleName = normalizeModule(parentId, moduleName);
|
||||
|
||||
var module = define.modules[moduleName];
|
||||
var module = _define.modules[moduleName];
|
||||
if (!module) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ var lookup = function(parentId, moduleName) {
|
|||
exports = returnValue || mod.exports;
|
||||
|
||||
// cache the resulting module object for next time
|
||||
define.modules[moduleName] = exports;
|
||||
_define.modules[moduleName] = exports;
|
||||
return exports;
|
||||
}
|
||||
|
||||
|
|
@ -4128,10 +4128,10 @@ var EditSession = function(text, mode) {
|
|||
var useWrapMode = this.$useWrapMode;
|
||||
var len;
|
||||
var action = e.data.action;
|
||||
var firstRow = e.data.range.start.row,
|
||||
lastRow = e.data.range.end.row,
|
||||
start = e.data.range.start,
|
||||
end = e.data.range.end;
|
||||
var firstRow = e.data.range.start.row;
|
||||
var lastRow = e.data.range.end.row;
|
||||
var start = e.data.range.start;
|
||||
var end = e.data.range.end;
|
||||
var removedFolds = null;
|
||||
|
||||
if (action.indexOf("Lines") != -1) {
|
||||
|
|
@ -4298,7 +4298,7 @@ var EditSession = function(text, mode) {
|
|||
TAB = 11,
|
||||
TAB_SPACE = 12;
|
||||
|
||||
this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {
|
||||
this.$computeWrapSplits = function(tokens, wrapLimit) {
|
||||
if (tokens.length == 0) {
|
||||
return [];
|
||||
}
|
||||
|
|
@ -4315,11 +4315,11 @@ var EditSession = function(text, mode) {
|
|||
var len = displayed.length;
|
||||
displayed.join("").
|
||||
// Get all the TAB_SPACEs.
|
||||
replace(/12/g, function(m) {
|
||||
replace(/12/g, function() {
|
||||
len -= 1;
|
||||
}).
|
||||
// Get all the CHAR_EXT/multipleWidth characters.
|
||||
replace(/2/g, function(m) {
|
||||
replace(/2/g, function() {
|
||||
len -= 1;
|
||||
});
|
||||
|
||||
|
|
@ -6714,7 +6714,7 @@ var Document = function(text) {
|
|||
case "auto":
|
||||
return this.$autoNewLine;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
this.$autoNewLine = "\n";
|
||||
this.$newLineMode = "auto";
|
||||
|
|
@ -6777,7 +6777,7 @@ var Document = function(text) {
|
|||
position.column = this.getLine(length-1).length;
|
||||
}
|
||||
return position;
|
||||
}
|
||||
};
|
||||
|
||||
this.insert = function(position, text) {
|
||||
if (text.length == 0)
|
||||
|
|
@ -6817,7 +6817,7 @@ var Document = function(text) {
|
|||
};
|
||||
this._dispatchEvent("change", { data: delta });
|
||||
return range.end;
|
||||
},
|
||||
};
|
||||
|
||||
this.insertNewLine = function(position) {
|
||||
position = this.$clipPosition(position);
|
||||
|
|
@ -6980,13 +6980,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "insertText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
else if (delta.action == "removeLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "removeText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -6997,13 +6997,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "insertText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
else if (delta.action == "removeLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "removeText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -12663,8 +12663,9 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|||
var CssHighlightRules = function() {
|
||||
|
||||
var properties = lang.arrayToMap(
|
||||
("-moz-box-sizing|-webkit-box-sizing|appearance|azimuth|background-attachment|background-color|background-image|" +
|
||||
"background-position|background-repeat|background|border-bottom-color|" +
|
||||
("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
|
||||
"appearance|azimuth|background-attachment|background-color|background-image|" +
|
||||
"background-origin|background-position|background-repeat|background|border-bottom-color|" +
|
||||
"border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
|
||||
"border-color|border-left-color|border-left-style|border-left-width|" +
|
||||
"border-left|border-right-color|border-right-style|border-right-width|" +
|
||||
|
|
@ -12677,14 +12678,14 @@ var CssHighlightRules = function() {
|
|||
"letter-spacing|line-height|list-style-image|list-style-position|" +
|
||||
"list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
|
||||
"margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
|
||||
"min-width|-moz-border-radius|opacity|orphans|outline-color|" +
|
||||
"min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
|
||||
"outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
|
||||
"padding-left|padding-right|padding-top|padding|page-break-after|" +
|
||||
"page-break-before|page-break-inside|page|pause-after|pause-before|" +
|
||||
"pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
|
||||
"pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
|
||||
"size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
|
||||
"stress|table-layout|text-align|text-decoration|text-indent|" +
|
||||
"text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
|
||||
"text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
|
||||
"visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
|
||||
"z-index").split("|")
|
||||
);
|
||||
|
|
@ -13632,7 +13633,7 @@ var HtmlHighlightRules = function() {
|
|||
// regexp must not have capturing parentheses
|
||||
// regexps are ordered -> the first match is used
|
||||
this.$rules = {
|
||||
start : [ {
|
||||
start : [{
|
||||
token : "meta.tag",
|
||||
merge : true,
|
||||
regex : "<\\!\\[CDATA\\[",
|
||||
|
|
@ -22350,7 +22351,7 @@ var KeyBinding = function(editor) {
|
|||
};
|
||||
|
||||
this.getKeyboardHandler = function() {
|
||||
return this.$handlers[this.$handlers - 1];
|
||||
return this.$handlers[this.$handlers.length - 1];
|
||||
};
|
||||
|
||||
this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
|
||||
|
|
@ -25545,7 +25546,7 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
|
|||
"\n" +
|
||||
".ace_editor textarea {\n" +
|
||||
" position: fixed;\n" +
|
||||
" z-index: -1;\n" +
|
||||
" z-index: 2000;\n" +
|
||||
" width: 10px;\n" +
|
||||
" height: 30px;\n" +
|
||||
" opacity: 0;\n" +
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
Ace
|
||||
version 0.2.0
|
||||
commit 1b58db895c6779c2492b4f5735677a87695bb422
|
||||
commit 6a6c4c4c1559f660210131fe83f60eb2beed8091
|
||||
|
||||
|
||||
-->
|
||||
|
|
@ -51,6 +51,7 @@
|
|||
<label for="theme">Theme</label>
|
||||
</td><td>
|
||||
<select id="theme" size="1">
|
||||
<option value="ace/theme/chrome">Chrome</option>
|
||||
<option value="ace/theme/clouds">Clouds</option>
|
||||
<option value="ace/theme/clouds_midnight">Clouds Midnight</option>
|
||||
<option value="ace/theme/cobalt">Cobalt</option>
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@ var _define = function(module, deps, payload) {
|
|||
if (arguments.length == 2)
|
||||
payload = deps;
|
||||
|
||||
if (!define.modules)
|
||||
define.modules = {};
|
||||
if (!_define.modules)
|
||||
_define.modules = {};
|
||||
|
||||
define.modules[module] = payload;
|
||||
_define.modules[module] = payload;
|
||||
};
|
||||
if (global.define)
|
||||
_define.original = global.define;
|
||||
|
|
@ -146,7 +146,7 @@ var lookup = function(parentId, moduleName) {
|
|||
|
||||
moduleName = normalizeModule(parentId, moduleName);
|
||||
|
||||
var module = define.modules[moduleName];
|
||||
var module = _define.modules[moduleName];
|
||||
if (!module) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ var lookup = function(parentId, moduleName) {
|
|||
exports = returnValue || mod.exports;
|
||||
|
||||
// cache the resulting module object for next time
|
||||
define.modules[moduleName] = exports;
|
||||
_define.modules[moduleName] = exports;
|
||||
return exports;
|
||||
}
|
||||
|
||||
|
|
@ -4872,7 +4872,7 @@ var KeyBinding = function(editor) {
|
|||
};
|
||||
|
||||
this.getKeyboardHandler = function() {
|
||||
return this.$handlers[this.$handlers - 1];
|
||||
return this.$handlers[this.$handlers.length - 1];
|
||||
};
|
||||
|
||||
this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
|
||||
|
|
@ -6301,10 +6301,10 @@ var EditSession = function(text, mode) {
|
|||
var useWrapMode = this.$useWrapMode;
|
||||
var len;
|
||||
var action = e.data.action;
|
||||
var firstRow = e.data.range.start.row,
|
||||
lastRow = e.data.range.end.row,
|
||||
start = e.data.range.start,
|
||||
end = e.data.range.end;
|
||||
var firstRow = e.data.range.start.row;
|
||||
var lastRow = e.data.range.end.row;
|
||||
var start = e.data.range.start;
|
||||
var end = e.data.range.end;
|
||||
var removedFolds = null;
|
||||
|
||||
if (action.indexOf("Lines") != -1) {
|
||||
|
|
@ -6471,7 +6471,7 @@ var EditSession = function(text, mode) {
|
|||
TAB = 11,
|
||||
TAB_SPACE = 12;
|
||||
|
||||
this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {
|
||||
this.$computeWrapSplits = function(tokens, wrapLimit) {
|
||||
if (tokens.length == 0) {
|
||||
return [];
|
||||
}
|
||||
|
|
@ -6488,11 +6488,11 @@ var EditSession = function(text, mode) {
|
|||
var len = displayed.length;
|
||||
displayed.join("").
|
||||
// Get all the TAB_SPACEs.
|
||||
replace(/12/g, function(m) {
|
||||
replace(/12/g, function() {
|
||||
len -= 1;
|
||||
}).
|
||||
// Get all the CHAR_EXT/multipleWidth characters.
|
||||
replace(/2/g, function(m) {
|
||||
replace(/2/g, function() {
|
||||
len -= 1;
|
||||
});
|
||||
|
||||
|
|
@ -8619,7 +8619,7 @@ var Document = function(text) {
|
|||
case "auto":
|
||||
return this.$autoNewLine;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
this.$autoNewLine = "\n";
|
||||
this.$newLineMode = "auto";
|
||||
|
|
@ -8682,7 +8682,7 @@ var Document = function(text) {
|
|||
position.column = this.getLine(length-1).length;
|
||||
}
|
||||
return position;
|
||||
}
|
||||
};
|
||||
|
||||
this.insert = function(position, text) {
|
||||
if (text.length == 0)
|
||||
|
|
@ -8722,7 +8722,7 @@ var Document = function(text) {
|
|||
};
|
||||
this._dispatchEvent("change", { data: delta });
|
||||
return range.end;
|
||||
},
|
||||
};
|
||||
|
||||
this.insertNewLine = function(position) {
|
||||
position = this.$clipPosition(position);
|
||||
|
|
@ -8885,13 +8885,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "insertText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
else if (delta.action == "removeLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "removeText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -8902,13 +8902,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "insertText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
else if (delta.action == "removeLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "removeText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -13543,7 +13543,7 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
|
|||
"\n" +
|
||||
".ace_editor textarea {\n" +
|
||||
" position: fixed;\n" +
|
||||
" z-index: -1;\n" +
|
||||
" z-index: 2000;\n" +
|
||||
" width: 10px;\n" +
|
||||
" height: 30px;\n" +
|
||||
" opacity: 0;\n" +
|
||||
|
|
@ -13979,7 +13979,7 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
|
|||
"\n" +
|
||||
".ace_editor textarea {\n" +
|
||||
" position: fixed;\n" +
|
||||
" z-index: -1;\n" +
|
||||
" z-index: 2000;\n" +
|
||||
" width: 10px;\n" +
|
||||
" height: 30px;\n" +
|
||||
" opacity: 0;\n" +
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
build/src/theme-chrome.js
Normal file
1
build/src/theme-chrome.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
define("ace/theme/chrome",["require","exports","module"],function(a,b,c){b.cssClass="ace-chrome",b.cssText=".ace-chrome .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-chrome .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-chrome .ace_gutter { width: 50px; background: #e8e8e8; color: #333; overflow : hidden;}.ace-chrome .ace_gutter-layer { width: 100%; text-align: right;}.ace-chrome .ace_gutter-layer .ace_gutter-cell { padding-right: 6px;}.ace-chrome .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-chrome .ace_text-layer { cursor: text;}.ace-chrome .ace_cursor { border-left: 2px solid black;}.ace-chrome .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-chrome .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-chrome .ace_line .ace_keyword { color: blue;}.ace-chrome .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-chrome .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-chrome .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-chrome .ace_line .ace_fold { background-color: #E4E4E4; border-radius: 3px;}.ace-chrome .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-chrome .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_support.ace_type,.ace-chrome .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-chrome .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-chrome .ace_line .ace_string { color: #1919a6;}.ace-chrome .ace_line .ace_comment { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc.ace_tag { color: #236e24;}.ace-chrome .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-chrome .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-chrome .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-chrome .ace_markup.ace_markupine { text-decoration:underline;}.ace-chrome .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-chrome .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_meta.ace_tag { color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex { color: rgb(255, 0, 0)}.ace-chrome .ace_entity.ace_other.ace_attribute-name{ color: #994409;}"})
|
||||
|
|
@ -1734,7 +1734,7 @@ var Document = function(text) {
|
|||
case "auto":
|
||||
return this.$autoNewLine;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
this.$autoNewLine = "\n";
|
||||
this.$newLineMode = "auto";
|
||||
|
|
@ -1797,7 +1797,7 @@ var Document = function(text) {
|
|||
position.column = this.getLine(length-1).length;
|
||||
}
|
||||
return position;
|
||||
}
|
||||
};
|
||||
|
||||
this.insert = function(position, text) {
|
||||
if (text.length == 0)
|
||||
|
|
@ -1837,7 +1837,7 @@ var Document = function(text) {
|
|||
};
|
||||
this._dispatchEvent("change", { data: delta });
|
||||
return range.end;
|
||||
},
|
||||
};
|
||||
|
||||
this.insertNewLine = function(position) {
|
||||
position = this.$clipPosition(position);
|
||||
|
|
@ -2000,13 +2000,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "insertText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
else if (delta.action == "removeLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "removeText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -2017,13 +2017,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "insertText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
else if (delta.action == "removeLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "removeText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1708,7 +1708,7 @@ var Document = function(text) {
|
|||
case "auto":
|
||||
return this.$autoNewLine;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
this.$autoNewLine = "\n";
|
||||
this.$newLineMode = "auto";
|
||||
|
|
@ -1771,7 +1771,7 @@ var Document = function(text) {
|
|||
position.column = this.getLine(length-1).length;
|
||||
}
|
||||
return position;
|
||||
}
|
||||
};
|
||||
|
||||
this.insert = function(position, text) {
|
||||
if (text.length == 0)
|
||||
|
|
@ -1811,7 +1811,7 @@ var Document = function(text) {
|
|||
};
|
||||
this._dispatchEvent("change", { data: delta });
|
||||
return range.end;
|
||||
},
|
||||
};
|
||||
|
||||
this.insertNewLine = function(position) {
|
||||
position = this.$clipPosition(position);
|
||||
|
|
@ -1974,13 +1974,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "insertText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
else if (delta.action == "removeLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "removeText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1991,13 +1991,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "insertText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
else if (delta.action == "removeLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "removeText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1730,7 +1730,7 @@ var Document = function(text) {
|
|||
case "auto":
|
||||
return this.$autoNewLine;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
this.$autoNewLine = "\n";
|
||||
this.$newLineMode = "auto";
|
||||
|
|
@ -1793,7 +1793,7 @@ var Document = function(text) {
|
|||
position.column = this.getLine(length-1).length;
|
||||
}
|
||||
return position;
|
||||
}
|
||||
};
|
||||
|
||||
this.insert = function(position, text) {
|
||||
if (text.length == 0)
|
||||
|
|
@ -1833,7 +1833,7 @@ var Document = function(text) {
|
|||
};
|
||||
this._dispatchEvent("change", { data: delta });
|
||||
return range.end;
|
||||
},
|
||||
};
|
||||
|
||||
this.insertNewLine = function(position) {
|
||||
position = this.$clipPosition(position);
|
||||
|
|
@ -1996,13 +1996,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "insertText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
else if (delta.action == "removeLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "removeText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -2013,13 +2013,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "insertText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
else if (delta.action == "removeLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "removeText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,12 @@ To package Ace we use the dryice build tool developed by the Mozilla Skywriter t
|
|||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Make sure you at least version 0.3.0 of dryice
|
||||
|
||||
```bash
|
||||
npm install dryice
|
||||
```
|
||||
|
||||
Afterwards Ace can be built by calling
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ function inject() {
|
|||
load.scripts = {};
|
||||
window.__ace_shadowed_load__ = load;
|
||||
|
||||
load('ace-uncompressed.js', 'text!ace/css/editor.css', function() {
|
||||
load('ace.js', 'text!ace/css/editor.css', function() {
|
||||
var ace = window.__ace_shadowed__;
|
||||
ace.options.mode = "javascript";
|
||||
var Event = ace.require("ace/lib/event");
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ window.__ace_shadowed__ = {
|
|||
require: function(module, callback) {
|
||||
return _require("", module, callback);
|
||||
},
|
||||
define: _define
|
||||
define: _define
|
||||
};
|
||||
|
||||
})();// vim:set ts=4 sts=4 sw=4 st:
|
||||
|
|
@ -4866,7 +4866,7 @@ var KeyBinding = function(editor) {
|
|||
};
|
||||
|
||||
this.getKeyboardHandler = function() {
|
||||
return this.$handlers[this.$handlers - 1];
|
||||
return this.$handlers[this.$handlers.length - 1];
|
||||
};
|
||||
|
||||
this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
|
||||
|
|
@ -6295,10 +6295,10 @@ var EditSession = function(text, mode) {
|
|||
var useWrapMode = this.$useWrapMode;
|
||||
var len;
|
||||
var action = e.data.action;
|
||||
var firstRow = e.data.range.start.row,
|
||||
lastRow = e.data.range.end.row,
|
||||
start = e.data.range.start,
|
||||
end = e.data.range.end;
|
||||
var firstRow = e.data.range.start.row;
|
||||
var lastRow = e.data.range.end.row;
|
||||
var start = e.data.range.start;
|
||||
var end = e.data.range.end;
|
||||
var removedFolds = null;
|
||||
|
||||
if (action.indexOf("Lines") != -1) {
|
||||
|
|
@ -6465,7 +6465,7 @@ var EditSession = function(text, mode) {
|
|||
TAB = 11,
|
||||
TAB_SPACE = 12;
|
||||
|
||||
this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {
|
||||
this.$computeWrapSplits = function(tokens, wrapLimit) {
|
||||
if (tokens.length == 0) {
|
||||
return [];
|
||||
}
|
||||
|
|
@ -6482,11 +6482,11 @@ var EditSession = function(text, mode) {
|
|||
var len = displayed.length;
|
||||
displayed.join("").
|
||||
// Get all the TAB_SPACEs.
|
||||
replace(/12/g, function(m) {
|
||||
replace(/12/g, function() {
|
||||
len -= 1;
|
||||
}).
|
||||
// Get all the CHAR_EXT/multipleWidth characters.
|
||||
replace(/2/g, function(m) {
|
||||
replace(/2/g, function() {
|
||||
len -= 1;
|
||||
});
|
||||
|
||||
|
|
@ -8613,7 +8613,7 @@ var Document = function(text) {
|
|||
case "auto":
|
||||
return this.$autoNewLine;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
this.$autoNewLine = "\n";
|
||||
this.$newLineMode = "auto";
|
||||
|
|
@ -8676,7 +8676,7 @@ var Document = function(text) {
|
|||
position.column = this.getLine(length-1).length;
|
||||
}
|
||||
return position;
|
||||
}
|
||||
};
|
||||
|
||||
this.insert = function(position, text) {
|
||||
if (text.length == 0)
|
||||
|
|
@ -8716,7 +8716,7 @@ var Document = function(text) {
|
|||
};
|
||||
this._dispatchEvent("change", { data: delta });
|
||||
return range.end;
|
||||
},
|
||||
};
|
||||
|
||||
this.insertNewLine = function(position) {
|
||||
position = this.$clipPosition(position);
|
||||
|
|
@ -8879,13 +8879,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "insertText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
else if (delta.action == "removeLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "removeText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -8896,13 +8896,13 @@ var Document = function(text) {
|
|||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
this.removeLines(range.start.row, range.end.row - 1)
|
||||
this.removeLines(range.start.row, range.end.row - 1);
|
||||
else if (delta.action == "insertText")
|
||||
this.remove(range)
|
||||
this.remove(range);
|
||||
else if (delta.action == "removeLines")
|
||||
this.insertLines(range.start.row, delta.lines)
|
||||
this.insertLines(range.start.row, delta.lines);
|
||||
else if (delta.action == "removeText")
|
||||
this.insert(range.start, delta.text)
|
||||
this.insert(range.start, delta.text);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -13537,7 +13537,7 @@ __ace_shadowed__.define("text!ace/css/editor.css", [], "@import url(//fonts.goog
|
|||
"\n" +
|
||||
".ace_editor textarea {\n" +
|
||||
" position: fixed;\n" +
|
||||
" z-index: -1;\n" +
|
||||
" z-index: 2000;\n" +
|
||||
" width: 10px;\n" +
|
||||
" height: 30px;\n" +
|
||||
" opacity: 0;\n" +
|
||||
|
|
@ -13973,7 +13973,7 @@ __ace_shadowed__.define("text!ace/css/editor.css", [], "@import url(//fonts.goog
|
|||
"\n" +
|
||||
".ace_editor textarea {\n" +
|
||||
" position: fixed;\n" +
|
||||
" z-index: -1;\n" +
|
||||
" z-index: 2000;\n" +
|
||||
" width: 10px;\n" +
|
||||
" height: 30px;\n" +
|
||||
" opacity: 0;\n" +
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
build/textarea/src/theme-chrome.js
Normal file
1
build/textarea/src/theme-chrome.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
__ace_shadowed__.define("ace/theme/chrome",["require","exports","module"],function(a,b,c){b.cssClass="ace-chrome",b.cssText=".ace-chrome .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-chrome .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-chrome .ace_gutter { width: 50px; background: #e8e8e8; color: #333; overflow : hidden;}.ace-chrome .ace_gutter-layer { width: 100%; text-align: right;}.ace-chrome .ace_gutter-layer .ace_gutter-cell { padding-right: 6px;}.ace-chrome .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-chrome .ace_text-layer { cursor: text;}.ace-chrome .ace_cursor { border-left: 2px solid black;}.ace-chrome .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-chrome .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-chrome .ace_line .ace_keyword { color: blue;}.ace-chrome .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-chrome .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-chrome .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-chrome .ace_line .ace_fold { background-color: #E4E4E4; border-radius: 3px;}.ace-chrome .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-chrome .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_support.ace_type,.ace-chrome .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-chrome .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-chrome .ace_line .ace_string { color: #1919a6;}.ace-chrome .ace_line .ace_comment { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc.ace_tag { color: #236e24;}.ace-chrome .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-chrome .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-chrome .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-chrome .ace_markup.ace_markupine { text-decoration:underline;}.ace-chrome .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-chrome .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_meta.ace_tag { color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex { color: rgb(255, 0, 0)}.ace-chrome .ace_entity.ace_other.ace_attribute-name{ color: #994409;}"})
|
||||
Loading…
Add table
Add a link
Reference in a new issue