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

[FR]: Support Excalidraw Plugin #267

Closed
2 tasks done
Tiim opened this issue Dec 30, 2023 · 5 comments
Closed
2 tasks done

[FR]: Support Excalidraw Plugin #267

Tiim opened this issue Dec 30, 2023 · 5 comments
Assignees

Comments

@Tiim
Copy link

Tiim commented Dec 30, 2023

Issue validation

  • I checked the issue to prevent duplicate
  • My issue concern doesn't concern the Mkdocs template

Is your feature related to a problem ?

The Obsidian Excalidraw plugin stores the Excalidraw drawing in a code block inside of a markdown file. If such an Excalidraw file is published, the full markdown document is published instead of the Excalidraw image.

What solution do you want to see ?

It would be very nice if obsidian-github-publisher could detect that a file is from the Excalidraw plugin (.excalidraw.md file extension) and render the Excalidraw image to an SVG and publish this instead. When an Excalidraw file is transcluded, the SVG file could be inserted directly into the markdown.

There is a library excalidraw-to-svg that can do this.

Describe the alternative you've considered

An alternative is to have the Excalidraw rendering when rendering the markdown from the github repository. However this can be complex because of transcluded drawings.

OS

Windows

Anything else?

No response

Plugin version

1.5.3

Obsidian version & debug log

n/a
@Mara-Li
Copy link
Member

Mara-Li commented Dec 30, 2023

Why it's better than using the embedding SVG instead of the .excalidraw file ?

@Tiim
Copy link
Author

Tiim commented Dec 31, 2023

Because the Excalidraw file is just a Markdown file with a code block containing json, and is not easily rendered. Especially if it is transcluded in another page.

The json contains the description of how the graphic looks, but is not human readable.

@Mara-Li
Copy link
Member

Mara-Li commented Dec 31, 2023

Hello, I researched and thinked but I found a problem: I didn't found any library to convert excalidraw to svg with typescript support.

The other question is not really a problem as I just need to change the link from .excalidraw to .svg file but I change already the file path so I just need a special condition for excalidraw file.

I think I will implement this, if I found a way to use the library provided with typescript.

@Mara-Li
Copy link
Member

Mara-Li commented Dec 31, 2023

Okay, successfully done. I need to test if everything work on mobile before pushing the update

@Mara-Li
Copy link
Member

Mara-Li commented Dec 31, 2023

You can try it with using the beta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants