diff --git a/lib/client/edit.js b/lib/client/edit.js index aeaadf03..43097f9a 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -33,7 +33,7 @@ var CloudCmd, Util, DOM, ace; }; this.show = function(pValue) { - var lMode; + var lMode, lSession; Images.showLoad({top:true}); @@ -49,9 +49,14 @@ var CloudCmd, Util, DOM, ace; not_append : true }); - Ace = ace.edit(Element); + Ace = ace.edit(Element); + lSession = Ace.getSession(); + Ace.setTheme('ace/theme/tomorrow_night_blue'); - Ace.getSession().setMode('ace/mode/javascript'); + lSession.setMode('ace/mode/javascript'); + Ace.setShowPrintMargin(false); + Ace.setShowInvisibles(true); + lSession.setUseSoftTabs(true); Ace.commands.addCommand({ name : 'hide', @@ -73,14 +78,12 @@ var CloudCmd, Util, DOM, ace; DOM.RESTfull.save( lPath, lValue ); } }); - - Ace.setShowPrintMargin(false); } if ( Util.isString(pValue) ) { Ace.setValue(pValue); CloudCmd.View.show(Element, function() { - Element.firstChild.focus(); + Ace.focus(); }); Key.unsetBind(); }