From 22049b856e0b368ad51bf192b9b4447717e07e33 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 4c65458e..af0af6c0 100644 --- a/js/editor.js +++ b/js/editor.js @@ -440,6 +440,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);