change darkmode detection

This commit is contained in:
Lukas Bach 2024-02-23 13:12:03 +01:00
parent 368972d7ba
commit e2a05eae97

View file

@ -8,7 +8,9 @@ export const mountCodeEditor = (
onChange?: () => void
) => {
let value = initialValue;
const theme = (app as any).getTheme() === "obsidian" ? "vs-dark" : "vs";
const theme = document.body.classList.contains("theme-dark")
? "vs-dark"
: "vs";
const queryParameters = new URLSearchParams();
queryParameters.append("context", codeContext);