Replies: 1 comment 7 replies
-
Hi again, I've noticed the addition of the I've used it in a dvjs script then I've exported a svg with the Here is the dvjs code: const file = dv.page("Example.excalidraw.md").file;
const ea = ExcalidrawAutomate;
ea.reset()
const scene = await ea.getSceneFromFile(file)
ea.copyViewElementsToEAforEditing(scene.elements)
await ea.createPNG()
.then((png) => {
const data = URL.createObjectURL(png);
dv.span(`<img src=${data}>`)
}); and here is the png rendered in the DOM from the code above: As you can see, embeds aren't working. Do you think it is feasible right now to force the excalidraw automate to load them before calling the |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've been wondering lately if it was possible to render an excalidraw drawing inside a dataviewjs view using only the path to the file?
I know i can add a
prop:: ![[drawing.excalidraw]]
inside a file and render it using a DQL TABLE but i'd like to do it without having to set this property beforehand.In fact, I have a bunch of .excalidraw.md files returned from a dataviewjs query (a call to
dv.pages("...")
) and from that, I'd like to render them with some control over the DOM structure, i.e. without relying on a dataviewjs rendering method like dv.table()I looked at what Excalidraw Automate could do about this.
I followed the Dataview specific examples in the documentation, but other than rendering a brand new file (fantastic feature though), it doesn't seem to be able to render an existing closed .excalidraw file...
I have this assumption because the only EA method that could target an already existing file is
setView
and it takes anExcalidrawView
as a parameter. I looked in the code base to see how I could get this type from a file, but the constructor only accepts aLeaf
which means the file must be open if I understand correctly.Did i miss something inside the API spec or is it indeed not doable right now?
Beta Was this translation helpful? Give feedback.
All reactions