zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.12k stars 228 forks source link

BUG: The nature SVG mode don't support center alignment #1469

Open ProudBenzene opened 11 months ago

ProudBenzene commented 11 months ago

When I set the preview image mode to svg, png, the Excalidraw images embedded in the md notes are all automatically centered. But when cut to native SVG, all Excalidraw images become aligned to the left!

This alignment makes the whole note look very awkward, I wonder if you could possibly fix this bug please? Without this problem the whole Excalidraw linkage with the note would be perfect! Thank you for your work on the plugin!

image
ShahriarKh commented 4 months ago

Try something like ![[drawing.excalidraw|300|center]] (the 300 is optional and you can just do |center). It works for me using native SVG. You can also use left or right

ProudBenzene commented 4 months ago

It still doesn't work for me... I wonder if it needs any special css snippets?🤔

ShahriarKh commented 4 months ago

Maybe your theme or a plugin is overriding this? I use Prism theme and no special snippets for this. Also you might want to check your excalidraw plugin version.

mrzhu666 commented 2 months ago

Can anyone provide css snippet to make svg center?