holxsam / tldraw-in-obsidian

A plugin to integrate Tldraw into Obsidian.
Apache License 2.0
166 stars 8 forks source link

Blank page when opening tldraw #52

Open 0PandaDEV opened 1 day ago

0PandaDEV commented 1 day ago

Whenever I open a tldraw file if it's an already existing one or creating a new one, I just get a blank black screen instead of the actual canvas.

There is a workaround for this and that is to quit obsidian and then when you start it back up it shows the canvas normally.

Expected:

CleanShot

Result:

cleanshot

jon-dez commented 1 day ago

I can't reproduce this, could you install the plugin in a new vault and see if the error occurs?

0PandaDEV commented 1 day ago

Turns out the issue is related to the Self-hosted LiveSync plugin, as soon as I turn it off everything is fine

jon-dez commented 1 day ago

Hmm that's weird, I hate to see there being a conflict with another plugin. Even if this doesn't seem to be caused by this plugin at first glance, there may be something this plugin does that breaks functionality. I think this issue should be kept open regardless so it could be tracked.

0PandaDEV commented 1 day ago

Oh, and also the new updated you release that fixed how images are stored is also not compatible with live sync because it's not stored in the vault folder.

jon-dez commented 1 day ago

Dang, I think I will need to change how assets are stored. Tldraw does provide API for that though. I will try to find time to implement a workaround for this.

jon-dez commented 21 hours ago

@0PandaDEV I've released a new version that should now store new images pasted into the drawing as an attachment in your obsidian vault. The only caveat is that any images stored in old drawings aren't extracted into your vault. I will need to implement a feature to extract those images. I've created a new issue for that here #53 https://github.com/holxsam/tldraw-in-obsidian/releases/tag/1.7.2