obsidian-image-toolkit
obsidian-image-toolkit copied to clipboard
Conflicting with Excalidraw plugin embeds
Hello,
Unfortunately, the excalidraw plugin and this plugin conflict.
It is not possible to open an embedded excalidraw canvas when this plugin is active:
Is there any way to work around this?
Thanks!
+1. Might look into fixing this myself as it completely impedes on the excalidraw workflow
private isImageElement = (imgEl: HTMLImageElement): boolean => {
return (
imgEl &&
'IMG' === imgEl.tagName &&
imgEl.className !==
'excalidraw-svg excalidraw-embedded-img excalidraw-canvas-immersive'
)
}
That fixes the issue and excalidraw now reverts to requiring a double click to open, but I wonder actually if keeping the svg image capabilities are worthwhile, for example you can zoom infinitely for clarity because it's an SVG. It just needs some tweaks to make it work correctly (render in the gallery view, and open at a larger real size).
It isn't the most sound piece of code as the class could change and I've only tested a few things, but I'm definitely thinking about opening a PR and seeing if @sissilab can help us out 👍
@lucmos It seems there is not any conflict now and I'll close this thread now. Please feel free to give feedback if you still got any trouble.
Good spot @sissilab. Confirmed it's working now on the latest Excalidraw version 🎉
I think it was fixed in this version, but eh, can't be bothered figuring out for sure!
Good spot @sissilab. Confirmed it's working now on the latest Excalidraw version 🎉
I think it was fixed in this version, but eh, can't be bothered figuring out for sure!
Thank you for providing this clue. I'll keep an key on it if encountering any conflict again.