zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.02k stars 216 forks source link

FR: Change the Markdown Preamble from JSON to EXCALIDRAW #1946

Open Aelentel opened 1 month ago

Aelentel commented 1 month ago

A the rationale is to be able to integrate with markdown visualizer outside of Obsidian, it's very frustrating to save the workspace on a remote reposiroty and ask ppl to install the whole suite (obsidian + excalidraw plugin).

Featured solution : use "excalidraw" instead of "json" markdown preamble, or make it configurable

Describe alternatives you've considered a script that would copy the markdown file and change the preamble, but it's manual as other documentation files contains "real" json payload that have to be rendred as json

here's how the markdown appear on gitlab with the "json" preamble. image

hint : we are using kroki integration rendering.

here's how the markdown appear on gitlab with the "excalidraw" preamble. image

zsviczian commented 1 month ago

I'm sorry, but I won't be able to change this. This would affect file format which creates an issue with backward compatibility.
I recommend storing Excalidraw json as compressed-json as that will have lesser performance impact on Obsidian indexing. Also then your issue of the codeblock type would be solved.

I don't get the point about "real" json, as the Excalidraw data is real JSON.

image

If your objective is Obsidian independence, then I recommend setting up Auto-Export to SVG and embedding that in your documents.

image