mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
feat(code): display user-selected color themes
This commit is contained in:
@@ -422,7 +422,6 @@ body.desktop #context-menu-container .dropdown-item > span {
|
||||
|
||||
.cm-editor {
|
||||
height: 100%;
|
||||
background: inherit;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,10 +81,6 @@ body ::-webkit-calendar-picker-indicator {
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
body .cm-editor {
|
||||
filter: invert(90%) hue-rotate(180deg);
|
||||
}
|
||||
|
||||
.excalidraw.theme--dark {
|
||||
--theme-filter: invert(80%) hue-rotate(180deg) !important;
|
||||
}
|
||||
|
||||
@@ -244,10 +244,6 @@ body ::-webkit-calendar-picker-indicator {
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
body .cm-editor {
|
||||
filter: invert(90%) hue-rotate(180deg);
|
||||
}
|
||||
|
||||
.excalidraw.theme--dark {
|
||||
--theme-filter: invert(80%) hue-rotate(180deg) !important;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { getThemeById } from "@triliumnext/codemirror";
|
||||
import type FNote from "../../entities/fnote.js";
|
||||
import options from "../../services/options.js";
|
||||
import TypeWidget from "./type_widget.js";
|
||||
@@ -31,6 +32,12 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
|
||||
lineWrapping: options.is("codeLineWrapEnabled"),
|
||||
...this.getExtraOpts()
|
||||
});
|
||||
|
||||
// Load the theme.
|
||||
const theme = getThemeById(options.get("codeNoteTheme"));
|
||||
if (theme) {
|
||||
await this.codeEditor.setTheme(theme);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user