mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°5621 Move ace 1.2.8 to NPM
As the package sizes 37.5MB (!!!!), we are keeping only the directory we are using (src-min). The rest (demo, src, src-min-noconflict, src-noconflict) is added in the root .gitignore and not present in the index. Description of those directories content is available in the GitHub repo README : https://github.com/ajaxorg/ace-builds
This commit is contained in:
5
node_modules/ace-builds/src-min/ext-spellcheck.js
generated
vendored
Normal file
5
node_modules/ace-builds/src-min/ext-spellcheck.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})});
|
||||
(function() {
|
||||
window.require(["ace/ext/spellcheck"], function() {});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user