feature(edit) add emmet

This commit is contained in:
coderaiser 2014-01-03 12:37:51 +00:00
parent 22649cfef3
commit 156d8f4ea9
2 changed files with 13803 additions and 1 deletions

View file

@ -35,7 +35,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
}
this.show = function(pValue) {
var lMode,
var lMode, htmlMode,
lName = Info.name,
isDir = Info.isDir,
lExt = Info.ext;
@ -64,8 +64,19 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
lMode = Modelist.modesByName.json.mode;
else
lMode = Modelist.getModeForPath(lName).mode;
htmlMode = Modelist.modesByName.html.mode;
Session.setMode(lMode);
if (lMode === htmlMode)
DOM.jsload(DIR + 'emmet.js', function() {
var Emmet = ace.require("ace/ext/emmet");
Emmet.setCore(window.emmet);
Ace.setOption("enableEmmet", true);
});
if (Util.isString(pValue)) {
Ace.setValue(pValue);
CloudCmd.View.show(Element, focus);
@ -216,6 +227,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
DIR + 'ext-language_tools.js',
DIR + 'ext-searchbox.js',
DIR + 'ext-modelist.js',
DIR + 'ext-emmet.js'
],
lAce = DIR + 'ace.js',
lURL = CloudFunc.getJoinURL(lFiles);

13790
lib/client/edit/emmet.js Normal file

File diff suppressed because it is too large Load diff