add soft tabs, show invisibles

This commit is contained in:
coderaiser 2013-07-09 09:51:10 +00:00
parent daaa0ac72a
commit 8f8cd8511d

View file

@ -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();
}