mirror of
https://github.com/lukasbach/obsidian-code-files.git
synced 2026-07-22 07:40:30 +00:00
change darkmode detection
This commit is contained in:
parent
368972d7ba
commit
e2a05eae97
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue