http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89864
Revision: 89864 Author: brion Date: 2011-06-11 00:08:54 +0000 (Sat, 11 Jun 2011) Log Message: ----------- CodeEditor: attempt at disabling some annoying keyboard shortcuts in Ace, but it's not working. Issue filed upstream at https://github.com/ajaxorg/ace/issues/294 & asked about on mailing list. Modified Paths: -------------- trunk/extensions/CodeEditor/modules/jquery.codeEditor.js Modified: trunk/extensions/CodeEditor/modules/jquery.codeEditor.js =================================================================== --- trunk/extensions/CodeEditor/modules/jquery.codeEditor.js 2011-06-11 00:02:51 UTC (rev 89863) +++ trunk/extensions/CodeEditor/modules/jquery.codeEditor.js 2011-06-11 00:08:54 UTC (rev 89864) @@ -92,6 +92,15 @@ var map = {js: 'javascript', css: 'css'}; var lang = map[ext]; + // Disable some annoying commands + // This doesn't seem to work; filed as https://github.com/ajaxorg/ace/issues/294 + var canon = require('pilot/canon'); + //console.log(canon.getCommandNames()); + canon.removeCommand('replace'); // ctrl+R + canon.removeCommand('transposeletters'); // ctrl+T + canon.removeCommand('gotoline'); // ctrl+L + //console.log(canon.getCommandNames()); + // Ace doesn't like replacing a textarea directly. // We'll stub this out to sit on top of it... // line-height is needed to compensate for oddity in WikiEditor extension, which zeroes the line-height on a parent container _______________________________________________ MediaWiki-CVS mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
