Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load inline css into the iframe #90

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

CobyPear
Copy link
Contributor

@CobyPear CobyPear commented Jan 27, 2024

The latest update of Obsidian broke this plugin since it loads CSS in a way that goes against the new content security policy in Obsidian 1.53+

Following the thread in #89 I am not about to download some file from a random google drive so I wanted to get the temporary fix into a branch for others to consume and possibly to upstream.

This seems to work for dark mode partially (the graph itself and shapes don't seem to be getting dark mode applied, probably a different set of assets getting blocked?) but when I try to switch back to light mode it doesn't work. Ideally the RequestManager probably needs to be reworked so that it works with the new CSP. I do not have the time right now to dig into that.

@BeJa1996
Copy link

BeJa1996 commented Feb 2, 2024

Hey CopyPear,

Thank you for the Pull Request. But how do I use this now in Obsidian? I guess via BRAT, but which Link am I supposed to use?

@CobyPear
Copy link
Contributor Author

CobyPear commented Feb 3, 2024

Hey CopyPear,

Thank you for the Pull Request. But how do I use this now in Obsidian? I guess via BRAT, but which Link am I supposed to use?

Hi @BeJa1996. I tried making a release on my fork to use with BRAT but it doesn't seem to be working. I'm not sure if BRAT handles this draw.io git submodule or even needs to, but it's not liking the release artifacts.

You can clone the fork and symlink your clone to your .obsidian/plugins folder in your vault. When you clone the repo use the --recurse-submodules to get the draw.io repo as well.
Run npm run build and you should see the plugin show up in the settings.

Sorry for the rough instructions. If you have questions lmk.

Nevermind, got the BRAT working 😅
https://github.com/CobyPear/drawio-obsidian/ <- this link should work but please note: I am not taking over maintenance or anything, especially without more discussion with others and ideally a word from the current maintainer.

@zapthedingbat zapthedingbat merged commit 3fc595b into zapthedingbat:main Mar 11, 2024
@CobyPear CobyPear deleted the temp-fix branch March 26, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants