excalidraw / excalidraw-desktop

An Electron wrapper for Excalidraw (Deprecated)

Home Page:https://excalidraw.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add thumbnail / preview to .excalidraw files on Mac/Windows/Linux

gersomvg opened this issue · comments

It would be awesome if you could distinguish between .excalidraw files in your download folder by having a thumbnail (and large preview by pressing space on a Mac). I assume it is possible to add these, since .sketch files have something similar?

I would love to dive into this and make a PR for this. No idea if I'm qualified to do it, but there is just one way to find out 😄

First collecting feedback / approval, before I'm spending time on this.

commented

That's interesting..! Right now the .excalidraw files are nothing more than a JSON.

I'm guessing in order to do that, we have to store it a specific way that mac wants to have it. While this is OK for Sketch (since it works only on Mac) we have a problem here since we OS independent.

I guess there is a way to do it for every OS without breaking the file? As long as the JSON is still readable as actual JSON somewhere down the file when you open it in a text editor?

I think the major question is: can this be done from a browser.

@gersomvg it's a great idea and you should def give it a try. We are here to help you. I would suggest to start by looking at the specific format that each OS needs. A quick googling will reveal the path. :)

Is there analytics data on which OS is most common amongst users? I would assume MacOS? That's also the OS I'm on, so maybe the easiest to start & test.

commented

Screenshot 2020-04-04 at 1 50 02 PM

I think this should be migrated to excalidraw-desktop where on macOS we should be able to have custom file icons and a Quick Look handler. Not sure if it’s supported in electron but we could definitely do it in a native app.

commented

.excalidraw files should open in the web browser as well.. I wouldn't break it.. or by other OS native apps..

commented

I think assigning an icon to *.excalidraw it's easy to do on Mac and Windows (not sure how linux is handling that)

@j-f1 It makes more sense indeed to move this issue to the desktop app. For MacOS I found this for example:

https://developer.apple.com/documentation/quicklookthumbnailing/providing_thumbnails_of_your_custom_file_types

It seems like the only way is to bundle it with an app. This also keeps the .excalidraw files light and clean JSON.

I think macOS files can have different “forks” and we might be able to put an icon in there, but I doubt that’s exposed to web APIs and I’m not sure if it’s even possible.