Update ACE Editor to version 1.32.6

This commit is contained in:
Sebastian Serth
2024-02-13 14:46:36 +01:00
committed by Sebastian Serth
parent 0a473c7fd3
commit b00d45521b
481 changed files with 171566 additions and 125260 deletions

View File

@@ -1,8 +1,6 @@
define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module) {
"use strict";
define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module){"use strict";
var event = require("../lib/event");
exports.contextMenuHandler = function(e){
exports.contextMenuHandler = function (e) {
var host = e.target;
var text = host.textInput.getElement();
if (!host.selection.isEmpty())
@@ -10,7 +8,6 @@ exports.contextMenuHandler = function(e){
var c = host.getCursorPosition();
var r = host.session.getWordRange(c.row, c.column);
var w = host.session.getTextRange(r);
host.session.tokenRe.lastIndex = 0;
if (!host.session.tokenRe.test(w))
return;
@@ -20,15 +17,12 @@ exports.contextMenuHandler = function(e){
text.setSelectionRange(w.length, w.length + 1);
text.setSelectionRange(0, 0);
text.setSelectionRange(0, w.length);
var afterKeydown = false;
event.addListener(text, "keydown", function onKeydown() {
event.removeListener(text, "keydown", onKeydown);
afterKeydown = true;
});
host.textInput.setInputHandler(function(newVal) {
console.log(newVal , value, text.selectionStart, text.selectionEnd);
host.textInput.setInputHandler(function (newVal) {
if (newVal == value)
return '';
if (newVal.lastIndexOf(value, 0) === 0)
@@ -45,14 +39,13 @@ exports.contextMenuHandler = function(e){
return "";
}
}
return newVal;
});
};
var Editor = require("../editor").Editor;
require("../config").defineOptions(Editor.prototype, "editor", {
spellcheck: {
set: function(val) {
set: function (val) {
var text = this.textInput.getElement();
text.spellcheck = !!val;
if (!val)
@@ -64,8 +57,11 @@ require("../config").defineOptions(Editor.prototype, "editor", {
}
});
});
(function() {
window.require(["ace/ext/spellcheck"], function() {});
}); (function() {
window.require(["ace/ext/spellcheck"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();