diff options
author | Florian Jacob <fjacob@lavabit.com> | 2011-10-05 00:23:16 +0200 |
---|---|---|
committer | Florian Jacob <fjacob@lavabit.com> | 2011-10-05 00:23:16 +0200 |
commit | 813e8b274a66f158f05edd4d69525696aa686661 (patch) | |
tree | 8ae1f71186655c4b395bdc2ee884e24992d79422 /apps/files_texteditor/js | |
parent | 93ed844015469acf658f3aef5e83c9d4a428a3ec (diff) | |
download | nextcloud-server-813e8b274a66f158f05edd4d69525696aa686661.tar.gz nextcloud-server-813e8b274a66f158f05edd4d69525696aa686661.zip |
Added all the remaining extensions to filetypes
mapping which ace-editor supports.
Diffstat (limited to 'apps/files_texteditor/js')
-rw-r--r-- | apps/files_texteditor/js/editor.js | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js index 8a23062748a..1eb21b8d9ee 100644 --- a/apps/files_texteditor/js/editor.js +++ b/apps/files_texteditor/js/editor.js @@ -12,14 +12,30 @@ function setSyntaxMode(ext){ // Loads the syntax mode files and tells the editor var filetype = new Array(); // Todo finish these - filetype["php"] = "php"; - filetype["html"] = "html"; - filetype["rb"] = "ruby"; + filetype["h"] = "c_cpp"; + filetype["c"] = "c_cpp"; + filetype["cpp"] = "c_cpp"; + filetype["clj"] = "clojure"; + filetype["coffee"] = "coffee"; // coffescript can be compiled to javascript + filetype["cs"] = "csharp"; filetype["css"] = "css"; + filetype["groovy"] = "groovy"; + filetype["html"] = "html"; + filetype["java"] = "java"; + filetype["js"] = "javascript"; + filetype["json"] = "json"; + filetype["ml"] = "ocaml"; + filetype["mli"] = "ocaml"; filetype["pl"] = "perl"; + filetype["php"] = "php"; filetype["py"] = "python"; + filetype["rb"] = "ruby"; + filetype["scad"] = "scad"; // seems to be something like 3d model files printed with e.g. reprap + filetype["scala"] = "scala"; + filetype["scss"] = "scss"; // "sassy css" + filetype["svg"] = "svg"; + filetype["textile"] = "textile"; // related to markdown filetype["xml"] = "xml"; - filetype["js"] = "javascript"; if(filetype[ext]!=null){ // Then it must be in the array, so load the custom syntax mode @@ -166,4 +182,4 @@ $(window).resize(function() { $(document).ready(function() { bindControlEvents(); -});
\ No newline at end of file +}); |