mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
add soft tabs, show invisibles
This commit is contained in:
parent
daaa0ac72a
commit
8f8cd8511d
1 changed files with 9 additions and 6 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue