Sha256: f0f30d6b2a634ce27a2cdb0ebc3db01572a1425391f0b1d3602bd132a09d8a0d

Contents?: true

Size: 1.33 KB

Versions: 25

Compression:

Stored size: 1.33 KB

Contents

ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){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="\x01\x01",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(){ace.require(["ace/ext/spellcheck"],function(){})}()

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
smithycms-0.8.1 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.7.3 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.7.2 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.7.1 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.7.0 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.10 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.5.99.3 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.9 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.7 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.6 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.5 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.4 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.3 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.5.99.2 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.5.99.1 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.5.99 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.2 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.1 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.5.2 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js
smithycms-0.6.0 vendor/assets/javascripts/ace-1.1.3/ext-spellcheck.js