Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta Bind Embedding a note with Properties field breaks #327

Open
2 of 7 tasks
AmericanBagel opened this issue May 18, 2024 · 1 comment
Open
2 of 7 tasks

Meta Bind Embedding a note with Properties field breaks #327

AmericanBagel opened this issue May 18, 2024 · 1 comment
Labels
help wanted Extra attention is needed upstream bug Undesired behavior caused by a bug in Obsidian or another plugin

Comments

@AmericanBagel
Copy link

AmericanBagel commented May 18, 2024

Please fill out these Check-boxes

  • I checked that the plugin is up to date
  • The issue persist with all other plugins and themes disabled

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Plugin Version

1.1.0

Describe the Issue

DISCLAIMER! Involves the external plugin Excalidraw!

When using a meta-bind-embed block in an Excalidraw Markdown note to embed a note that has a Properties field (even the field is empty with no properties), the Markdown reading view renders the Excalidraw embed display instead of the note's Markdown content.

Embedding a note that has no Properties field produces expected behavior.

The issue probably lies between some strange interaction between the two plugins, but I'm posting the issue here because something about how Meta Bind is using renderMarkdown on notes with Properties is interfering with Excalidraw, and I think the issue can (maybe?) be easier fixed on the Meta Bind side.

Steps to Reproduce

  1. Create fresh vault
  2. Install and enable Excalidraw and Meta Bind
  3. Create the note Problematic Embed with a Properties field (can be empty, can have properties, makes no difference) as follows:
---

---
This is a problematic embed!
  1. Create an Excalidraw drawing, open the Command Palette, and select Excalidraw: Toggle between Excalidraw and Markdown mode. Then, anywhere in the file, use a Meta Bind Embed to embed Problematic Embed as follows:
---

excalidraw-plugin: parsed
tags: [excalidraw]

---
```meta-bind-embed
[[Problematic embed]]
The embed above will break Reading View!
```
# Drawing
```json
{"type":"excalidraw","version":2,"source":"https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.1.8","elements":[],"appState":{"gridSize":null,"viewBackgroundColor":"#ffffff"}}
```
%%
  1. Switch to Reading View

Attached below is an optional demonstration vault I made to reproduce the bug. I recommend getting a brief look at each file in the vault to make sure I'm not trying to get you to run anything malicious. Then you'll have to install Excalidraw and Meta Bind yourself -- just a few clicks away -- since executing arbitary JavaScript in an Electron application that a stranger sent you is icky!
demonstration vault.zip

Expected Behavior

I expected Meta Bind Embeds embedding notes with properties to not oddly interfere with the Markdown reading view on an Excalidraw Markdown note.

@AmericanBagel AmericanBagel added the bug Undesired behavior caused by this plugin label May 18, 2024
@mProjectsCode
Copy link
Owner

i haven't tested this, as I am on vacation, but if this only happens in some special excalidraw thing, then most likely excalidraw is at fault

@mProjectsCode mProjectsCode added help wanted Extra attention is needed upstream bug Undesired behavior caused by a bug in Obsidian or another plugin labels May 18, 2024
@AmericanBagel AmericanBagel reopened this Jun 12, 2024
@mProjectsCode mProjectsCode removed the bug Undesired behavior caused by this plugin label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed upstream bug Undesired behavior caused by a bug in Obsidian or another plugin
Projects
None yet
Development

No branches or pull requests

2 participants