diff options
author | Tom Needham <needham.thomas@gmail.com> | 2012-03-10 14:00:57 +0000 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2012-03-10 14:00:57 +0000 |
commit | 3f507898d0a6c7e68586c85c316940ff9f0423ed (patch) | |
tree | 4599af6c837536831be4d14f2b619ee6d4084ab6 | |
parent | b4ffaa9498b27bd1b2adfc09df7877af59170507 (diff) | |
download | nextcloud-server-3f507898d0a6c7e68586c85c316940ff9f0423ed.tar.gz nextcloud-server-3f507898d0a6c7e68586c85c316940ff9f0423ed.zip |
update file extensions in editor
-rw-r--r-- | apps/files_texteditor/js/editor.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js index e45652b6ef3..085bd60be2d 100644 --- a/apps/files_texteditor/js/editor.js +++ b/apps/files_texteditor/js/editor.js @@ -11,7 +11,7 @@ function getFileExtension(file){ function setSyntaxMode(ext){ // Loads the syntax mode files and tells the editor var filetype = new Array(); - // Todo finish these + // add file extensions like this: filetype["extension"] = "filetype": filetype["h"] = "c_cpp"; filetype["c"] = "c_cpp"; filetype["clj"] = "clojure"; @@ -27,8 +27,14 @@ function setSyntaxMode(ext){ filetype["js"] = "javascript"; filetype["json"] = "json"; filetype["latex"] = "latex"; + filetype["ly"] = "latex"; + filetype["ily"] = "latex"; filetype["lua"] = "lua"; - filetype["markdown"] = "markdown"; // also: .md .markdown .mdown .mdwn + filetype["markdown"] = "markdown"; + filetype["md"] = "markdown"; + filetype["mdown"] = "markdown"; + filetype["mdwn"] = "markdown"; + filetype["mkd"] = "markdown"; filetype["ml"] = "ocaml"; filetype["mli"] = "ocaml"; filetype["pl"] = "perl"; @@ -142,7 +148,7 @@ function doFileSave(){ // Show saving spinner $("#editor_save").die('click',doFileSave); $('#save_result').remove(); - $('#editor_save').text(t('files_texteditor','Saving...'));//after('<img id="saving_icon" src="'+OC.filePath('core','img','loading.gif')+'"></img>'); + $('#editor_save').text(t('files_texteditor','Saving...')); // Get the data var filecontents = window.aceEditor.getSession().getValue(); // Send the data |