feature(edit) add json mode for dir

This commit is contained in:
coderaiser 2013-11-27 13:39:24 +00:00
parent d64c7a0a3d
commit 7006c52c79

View file

@ -65,7 +65,10 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
if (!Modelist)
Modelist = ace.require('ace/ext/modelist');
lMode = Modelist.getModeForPath(lName).mode;
if (DOM.isCurrentIsDir())
lMode = Modelist.modesByName.json.mode
else
lMode = Modelist.getModeForPath(lName).mode;
Session.setMode(lMode);
Ace.setOptions({