mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
added ctrl-s handler to codemirror editor
This commit is contained in:
parent
ebf30a0e31
commit
d9aa10f53d
2 changed files with 6 additions and 3 deletions
|
|
@ -63,7 +63,7 @@ var CloudCommander, Util, DOM, CodeMirror;
|
|||
parent : FM
|
||||
});
|
||||
|
||||
CodeMirrorEditor.CodeMirror = new CodeMirror(CodeMirrorElement,{
|
||||
var lEditor = CodeMirrorEditor.CodeMirror = new CodeMirror(CodeMirrorElement,{
|
||||
mode : 'javascript',
|
||||
value : pParams && pParams.data && pParams.data.data,
|
||||
theme : 'night',
|
||||
|
|
@ -76,7 +76,10 @@ var CloudCommander, Util, DOM, CodeMirror;
|
|||
'Esc': function(){
|
||||
Util.exec(pParams);
|
||||
DOM.remove(lCSS, document.head);
|
||||
}
|
||||
},
|
||||
'Ctrl-S': function(){
|
||||
Util.log(lEditor.getValue());
|
||||
}
|
||||
},
|
||||
readOnly : ReadOnly
|
||||
});
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
if( Util.isContainStr(lCmd, 'fs') ){
|
||||
pParams.request.url = '/' + lCmd + '?json';
|
||||
lResult = onFS({
|
||||
onFS({
|
||||
request : pParams.request,
|
||||
response: pParams.response,
|
||||
method : lMethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue