From e636ea0471e96a83dd61229d3ae72f08d1ef438b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Mon, 5 Feb 2018 17:47:12 +0100 Subject: [PATCH] Fix ACE module files failing to load MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the ACE editor is initialized, by default the base path used to load module files is set to the directory of the "ace.js" file. Since the JavaScript files were merged "ace.js" is no longer added to the page as a single script file, so the base path was no longer set, and thus the module files failed to load. Now the right base path is explicitly set in the editor configuration. Signed-off-by: Daniel Calviño Sánchez --- js/editor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/editor.js b/js/editor.js index 958f9a8c..a99de253 100644 --- a/js/editor.js +++ b/js/editor.js @@ -439,6 +439,10 @@ var Files_Texteditor = { * Configure the ACE editor */ configureACE: function(file) { + ace.require('ace/config').set( + 'basePath', + OC.filePath('files_texteditor', 'js', 'core/vendor/ace-builds/src-noconflict') + ); window.aceEditor = ace.edit(this.editor); aceEditor.getSession().setNewLineMode("windows"); aceEditor.setShowPrintMargin(false);