zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.22k stars 231 forks source link

BUG: embed alignment and text wrapping not working as expected #1653

Open Amm4r03 opened 7 months ago

Amm4r03 commented 7 months ago

Your environment SYSTEM INFO: Obsidian version: v1.5.3 Installer version: v1.1.9 Operating system: Windows 10 Home Single Language 10.0.18363 Login status: not logged in Insider build toggle: off Live preview: off Base theme: adapt to system Community theme: none Snippets enabled: 0 Restricted mode: off Plugins installed: 1 Plugins enabled: 1 1: Excalidraw v2.0.25

Describe the bug The plugin functionality to align embeds in the notes and wrap text around the embed does not seem to be working. It used to work perfectly earlier. I ran this in the sandbox vault to ensure that there was nothing else causing it to be displayed like this. Generally, using an alignment mode such as right-wrap or left-wrap resulted in an aligned embed and text wrapped around it as specified. But now this isn't working as expected. The embed is getting aligned alright but the text is not wrapping in the lines around the embed (see screenshots)

To Reproduce Steps to reproduce the behavior:

  1. open your vault (preferably the sandbox vault)
  2. download and enable the excalidraw plugin
  3. create a test drawing for demonstration
  4. embed the drawing in a note with some sample text
  5. set the embed alignment to either right-wrap or left-wrap (ex. ![[Drawing 2024-03-19 06.50.25.excalidraw|right-wrap]])

Expected behavior the alignment specified should have aligned the embed as specified and wrapped the text around the embed

Screenshots preview mode : image

source mode : image

pina771 commented 1 month ago

I think this can be solved by removing the width: 100% in the appropriate classes.

Here's an example where I've disabled the width property : Screenshot 2024-09-24 at 17 05 37

PS - First time commenter, not sure about the full implications of removing the property.

Amm4r03 commented 1 month ago

just disabled this setting and it works perfectly fine now. Not sure what triggered this style setting though. Is there a way to find the source from which this CSS is coming? Because this used to work just alright earlier.