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:
Sebastian Serth
2024-02-14 00:47:50 +01:00
committed by Sebastian Serth
parent 942dbd20db
commit 4f8d313da4
480 changed files with 39 additions and 329597 deletions

View File

@ -4,8 +4,9 @@
= f.label(:name, class: 'form-label')
= f.text_field(:name, class: 'form-control', required: true)
.mb-3
/ The list of editor modes is loaded through JavaScript and dynamically populated based on supported modes by the ACE editor.
= f.label(:editor_mode, class: 'form-label')
= f.select(:editor_mode, @editor_modes, {}, class: 'form-control')
= f.select(:editor_mode, [], {}, class: 'form-control', data: {selected: @file_type.editor_mode})
.mb-3
= f.label(:file_extension, class: 'form-label')
= f.text_field(:file_extension, class: 'form-control', placeholder: '.rb')