mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(edit) add emmet
This commit is contained in:
parent
22649cfef3
commit
156d8f4ea9
2 changed files with 13803 additions and 1 deletions
|
|
@ -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
13790
lib/client/edit/emmet.js
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue