Hi, when I insert a site page with a white background in my note, is it possible to turn it in a dark theme, please ?
How are you doing this insertion?
I guess he means a PDF, I use the LaTeXWorkshop Extension for VS Code a lot and it has a feature to basically invert (its a bit more advanced because most images look just a bit altered) the PDF in Preview.
I think that would actually be really cool in Obsidian too!
When I use this :
<iframe
src="https://embed.blablabla="940"
height="560" frameborder="0"></iframe>
const iframes = document.querySelectorAll('iframe');
function toggleTheme() {
for (i = 0; i < iframes.length; i++) {
iframes[i].classList.toggle('is-dark');
}
}
.is-dark {
filter: invert(80%);
}
<!doctype html>
<html lang="en">
<body>
<button onClick="toggleTheme();">Toogle Theme</button>
<iframe id="the-iframe" src="https://wikipedia.org/"></iframe>
</body>
</html>
can these be implemented inside obsidian ?
got it from stack over flow and here is the link and see it in action javascript - How to change background color of an iframe while toggling light/dark mode? - Stack Overflow
1 Like