From 385b4cb9327b1e5fe4c87426e588bd8b8ea7240c Mon Sep 17 00:00:00 2001 From: Jan Jongboom Date: Fri, 18 Nov 2011 10:58:58 +0100 Subject: [PATCH] ace-uncompressed build update --- build/src/ace-uncompressed.js | 43 +++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/build/src/ace-uncompressed.js b/build/src/ace-uncompressed.js index 93260382..aae18789 100644 --- a/build/src/ace-uncompressed.js +++ b/build/src/ace-uncompressed.js @@ -3145,6 +3145,36 @@ var Editor = function(renderer, session) { this.session.replace(range, swap); }; + this.toLowerCase = function() { + if (this.$readOnly) + return; + + var originalRange = this.getSelectionRange(); + if (this.selection.isEmpty()) { + this.selection.selectWord(); + } + + var range = this.getSelectionRange(); + var text = this.session.getTextRange(range); + this.session.replace(range, text.toLowerCase()); + this.selection.setSelectionRange(originalRange); + }; + + this.toUpperCase = function() { + if (this.$readOnly) + return; + + var originalRange = this.getSelectionRange(); + if (this.selection.isEmpty()) { + this.selection.selectWord(); + } + + var range = this.getSelectionRange(); + var text = this.session.getTextRange(range); + this.session.replace(range, text.toUpperCase()); + this.selection.setSelectionRange(originalRange); + }; + this.indent = function() { if (this.$readOnly) return; @@ -5220,6 +5250,14 @@ exports.commands = [{ name: "transposeletters", bindKey: bindKey("Ctrl-T", "Ctrl-T"), exec: function(editor) { editor.transposeLetters(); } +}, { + name: "touppercase", + bindKey: bindKey("Ctrl-U", "Ctrl-U"), + exec: function(editor) { editor.toUpperCase(); } +}, { + name: "tolowercase", + bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"), + exec: function(editor) { editor.toLowerCase(); } }, { name: "fold", bindKey: bindKey("Alt-L", "Alt-L"), @@ -13248,8 +13286,7 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa * * ***** END LICENSE BLOCK ***** */ -define('ace/theme/textmate', ['require', 'exports', 'module' ], function(require, exports, module) { - +define('ace/theme/textmate', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) { exports.cssClass = "ace-tm"; exports.cssText = ".ace-tm .ace_editor {\ @@ -13419,6 +13456,8 @@ exports.cssText = ".ace-tm .ace_editor {\ color: rgb(255, 0, 0)\ }"; + var dom = require("ace/lib/dom"); + dom.importCssString(exports.cssText); }); define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);\n" + "\n" +