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

Incompatibility with Excalidraw #20

Closed
zsviczian opened this issue Aug 16, 2021 · 2 comments
Closed

Incompatibility with Excalidraw #20

zsviczian opened this issue Aug 16, 2021 · 2 comments

Comments

@zsviczian
Copy link

@yuvve recorded the following issue for Excalidraw: zsviczian/obsidian-excalidraw-plugin#124
I was able to reproduce the error. I looked at your source code. Based on my quick scan I would try adding

let view = this.app.workspace.getActiveViewOfType(MarkdownView);
if (!view) return;

to here

I am not really sure if this will solve the problem, but it seems you make modifications to the document object even if the view is not a markdown view: see here

@esm7
Copy link
Owner

esm7 commented Aug 16, 2021

Indeed, this code is ancient and needs some urgent renewal, it actually even precedes Obsidian's formal API...
I'll make the needed adjustments and test them as soon as I get the chance.

@esm7
Copy link
Owner

esm7 commented Aug 19, 2021

Fixed.
The issue was eventually in the very hacky way the plugin overwrote @media print style rules for the purpose of RTLing exports. It's still way more hacky than I'd want, but it's now far more selective and doesn't interfere with Excalidraw.
Also, just for the heck of it I also added better checking for the view type before making these overwrites.

@esm7 esm7 closed this as completed Aug 19, 2021
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

No branches or pull requests

2 participants