Installed requireJS and configured it to load all js libraries as before.
Added bootstrap as a dependency of jquery-ui so it is loaded correctly!
Detect content-type of file and load specified CodeMirror mode when opening.

re-enabled page protection on index.php (committed by accident)