mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
CSS hinting now on SQL, CSS and XML
Applied with a smarter approach to the code here
This commit is contained in:
12
editor.php
12
editor.php
@@ -149,13 +149,11 @@ CodeMirror.keyMap.ICEcoder = {
|
||||
fallthrough: ["default"]
|
||||
};
|
||||
CodeMirror.commands.autocomplete = function(cm) {
|
||||
CodeMirror.showHint(cm,
|
||||
top.ICEcoder.caretLocType=="JavaScript"
|
||||
? CodeMirror.hint.javascript
|
||||
: top.ICEcoder.caretLocType=="CoffeeScript"
|
||||
? CodeMirror.hint.coffeescript
|
||||
: CodeMirror.hint.html
|
||||
);
|
||||
var langType = top.ICEcoder.caretLocType;
|
||||
if (["JavaScript","CoffeeScript","SQL","CSS","HTML","XML","Content"].indexOf(langType)>-1) {
|
||||
if (langType=="XML"||langType=="Content") {langType="HTML"};
|
||||
CodeMirror.showHint(cm,CodeMirror.hint[langType.toLowerCase()]);
|
||||
}
|
||||
}
|
||||
|
||||
function createNewCMInstance(num) {
|
||||
|
||||
Reference in New Issue
Block a user