obsidian-digital-garden icon indicating copy to clipboard operation
obsidian-digital-garden copied to clipboard

Excalidraw: Publishing without files (images, PDF...)

Open dclausen01 opened this issue 1 year ago • 1 comments

Hi Ole, I'm still working with your plugin and my digital garden works mostly fine 👍 One thing is bugging me, though:

When I export / publish an .excalidraw.md file, the transcluded (or linked) files like images or PDF-documents aren't uploaded automatically as they would from a normal Markdown note.

I looked into your code and saw, that there is no asset management for Excalidraw files (if I read it correctly - I'm still not very skilled in JavaScript). Because all linked and transcluded files are listed in the frontmatter of an Excalidraw file I guess it wouldn't be too hard to add this support.

Please don't bother looking into this, if I'm the only person using this feature!

dclausen01 avatar Sep 23 '23 17:09 dclausen01

This might be relevant:

https://docs.excalidraw.com/docs/codebase/json-schema#attributes

  // files data for "image" elements, using format `{ [fileId]: fileData }`
  "files": {
    // example of an image data object
    "3cebd7720911620a3938ce77243696149da03861": {
      "mimeType": "image/png",
      "id": "3cebd7720911620a3938c.77243626149da03861",
      "dataURL": "data:image/png;base64,iVBORWOKGgoAAAANSUhEUgA=",
      "created": 1690295874454,
      "lastRetrieved": 1690295874454
    }
    /* ...other image data objects */
  }

julesvirallinen avatar Oct 01 '23 16:10 julesvirallinen