Introduce Dark Mode
This commit mainly changes the color definitions. Mostly, those changes are semantically equally, but there are a few changes that occurred to align the color scheme within the app.
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
(function() {
|
||||
var ACE_FILES_PATH = '<%= "#{Rails.application.config.relative_url_root.chomp('/')}/assets/ace/" %>';
|
||||
|
||||
window.MarkdownEditor = function(selector) {
|
||||
ace.config.set('modePath', ACE_FILES_PATH);
|
||||
_.each(['modePath', 'themePath', 'workerPath'], function (attribute) {
|
||||
ace.config.set(attribute, CodeOceanEditor.ACE_FILES_PATH);
|
||||
}.bind(this));
|
||||
var editor = ace.edit($(selector).next()[0]);
|
||||
editor.on('change', function() {
|
||||
$(selector).val(editor.getValue());
|
||||
});
|
||||
editor.setShowPrintMargin(false);
|
||||
editor.setTheme(CodeOceanEditor.THEME);
|
||||
var session = editor.getSession();
|
||||
session.setMode('ace/mode/markdown');
|
||||
session.setUseWrapMode(true);
|
||||
|
Reference in New Issue
Block a user