mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
feature(edit) add json mode for dir
This commit is contained in:
parent
d64c7a0a3d
commit
7006c52c79
1 changed files with 4 additions and 1 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue