zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
3.96k stars 213 forks source link

BUG: Excalidraw doesn't flip/toggle to excalidraw view #1881

Closed Jaked2001 closed 1 month ago

Jaked2001 commented 1 month ago

I couldn't find any similar issue, hopefully I didn't miss anything


Your environment SYSTEM INFO: Obsidian version: v1.6.5 Installer version: v1.4.13 Operating system: Darwin Kernel Version 21.6.0: Thu Mar 9 20:08:59 PST 2023; root:xnu-8020.240.18.700.8~1/RELEASE_X86_64 21.6.0 Login status: not logged in Insider build toggle: off Live preview: on Base theme: adapt to system Community theme: AnuPpuccin v1.5.0 Snippets enabled: 1 Restricted mode: off Plugins installed: 31 Plugins enabled: 24 1: Admonition v10.3.2 2: Calendar v1.5.10 3: Weather Fetcher v0.0.3 4: Charts v3.9.0 5: Templater v2.3.3 6: Advanced Tables v0.21.0 7: Highlightr v1.2.2 8: Dataview v0.5.67 9: Timestamp Notes v1.0.8 10: Image Toolkit v1.4.1 11: Style Settings v1.0.8 12: Image Captions v1.1.0 13: Latex Suite v1.9.4 14: Hover Editor v0.11.20 15: Omnivore v1.10.3 16: Digital Garden v2.57.2 17: Todoist Sync v1.13.0 18: Omnisearch v1.23.1 19: Widgets v0.0.9 20: Quick Latex v2.6.5 21: Excalidraw v2.2.9 22: Tasks v7.6.1 23: QuickAdd v1.10.0 24: Iconize v2.14.2

RECOMMENDATIONS: Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets. Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Describe the bug When I try to create a new excalidraw drawing (any command), it opens in md mode. Then, if I try to toggle to excalidraw view, it doesn't give the option. If I use the command "Convert markdown note to excalidraw drawing" it does the right thing. Then, if I flip back to md, it's like it loses the excalidraw side and doesn't go back.

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Create a new drawing (any command you please)
  2. See error

Expected behavior I expect to open an excalidraw file when creating a new drawing.

Screenshots

Schermata 2024-07-14 alle 09 37 50

This is what happens:

Schermata 2024-07-14 alle 09 37 59

I can convert to excalidraw drawing:

Schermata 2024-07-14 alle 09 41 25

and this is what I get:

Schermata 2024-07-14 alle 09 41 35

But if I flip back to md:

Schermata 2024-07-14 alle 09 42 41

I can't flip again to excalidraw:

Schermata 2024-07-14 alle 09 43 11

Additional context Please note that none of the plugins I use listed are new downloads: I'm sure it wasn't the download of one of those plugin to brake things for me. I'm not excluding it was updating one though.

I'm not sure if this is related but I do have quite a large number of excalidraw files in my voult: 545 excalidraw drawings plus, many of those where created with automatic .png export.

The only thing I can think of that has drastically changed in my voult in the past few days is setting up a template for visual notes following this video by Nicole Van der Hoeven: https://youtu.be/zmgqMZi6QL8?si=XT_w7adH3uURn0Xv. After setting this up though I used it without any problem for a week or so.

EDIT: Seeing that the last version of excalidraw 2.2.9 just came out yesterday, and I updated right away, I wouldn't exclude a connection. Yesterday is when I started experiencing these problems for the first time.

On a side note though, I installed excalidraw (same version) in an empty new voult, and it works fine.

zsviczian commented 1 month ago

By the looks of it, this feels like either a template issue (though the fact that the drawing opens the first time, this is unlikely) or another plugin messing up the Excalidraw file after it was saved. I can't reproduce in my own Vault.

I understand you did not download new plugins, however, you have updated plugins (maybe at the same time as updating Excalidraw to 2.2.9), so there could be a new feature, or maybe you have changed plugin settings for some other plugins... Please disable other plugins, create a new drawing, and see if you can reproduce the issue.

Jaked2001 commented 1 month ago

I’m not sure what was wrong, but also obsidian started acting funny so I just restarted my MacBook and it fixed itself.

I’m sorry if I caused you to lose any time on this when it had such a simple solution, and honestly kind of dumb for not trying that right way.

Seems to be working fine now. Thanks for the time and keep up the good work!!

zsviczian commented 1 month ago

Based on this, the issue was somehow related to Obsidian indexing. How and why I have no idea...