Use webpack to deliver newest ACE editor
With this commit, we change the delivery method for the ACE editor from manually copied files to using yarn and webpack. As a side-change, we also modify how the mode is selected through JavaScript instead of Ruby. Through webpack, the `modePath`, `themePath`, and `workerPath` are automatically determined and working as expected. Closes #250
This commit is contained in:

committed by
Sebastian Serth

parent
942dbd20db
commit
4f8d313da4
@ -5,12 +5,6 @@ $(document).on('turbolinks:load', function () {
|
||||
var file_types;
|
||||
const editors = [];
|
||||
|
||||
var configureEditors = function () {
|
||||
_.each(['modePath', 'themePath', 'workerPath'], function (attribute) {
|
||||
ace.config.set(attribute, CodeOceanEditor.ACE_FILES_PATH);
|
||||
});
|
||||
};
|
||||
|
||||
var initializeEditor = function (index, element) {
|
||||
var editor = ace.edit(element);
|
||||
|
||||
@ -487,7 +481,6 @@ $(document).on('turbolinks:load', function () {
|
||||
}
|
||||
|
||||
if ($('#editor-edit').isPresent()) {
|
||||
configureEditors();
|
||||
initializeEditors();
|
||||
$('.frame').show();
|
||||
}
|
||||
|
Reference in New Issue
Block a user