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

Support embedded scene in png #10

Closed
nyonson opened this issue Nov 18, 2021 · 6 comments · Fixed by #29
Closed

Support embedded scene in png #10

nyonson opened this issue Nov 18, 2021 · 6 comments · Fixed by #29
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects

Comments

@nyonson
Copy link

nyonson commented Nov 18, 2021

I believe the workflow with the plugin currently requires having a separate excalidraw file per exported png. Would it be possible to take advantage of excalidraw's embedded schene in png feature?

@pomdtr
Copy link
Collaborator

pomdtr commented Dec 6, 2021

Sadly this feature is not available in the npm package :/

@johan1252
Copy link

Looks like embedded scene support is included in latest version of the plugin (not yet in VsCode extensions marketplace).
The toggle exportEmbedScene should apply to both .svg and .png as per below:
https://github.com/excalidraw/excalidraw/blob/1c11df011a2f1eaf7f1164f475c94fc3ebe9f36b/src/data/index.ts#L80

@johan1252
Copy link

@pomdtr Do you know when a new version will be released in the VsCode marketplace?
I have been looking to use the embedded scene option for .svg export but VsCode marketplace version is still v1.2.0

@pomdtr
Copy link
Collaborator

pomdtr commented Dec 14, 2021

Yeah I'm a bit lost in refactoring hell right now, I'll try to merge my changes this weekend 😅

You're looking at the wrong file for the export function, the utility available in the API is https://github.com/excalidraw/excalidraw/blob/1c11df011a2f1eaf7f1164f475c94fc3ebe9f36b/src/packages/utils.ts#L51

@leighmcculloch
Copy link

leighmcculloch commented Dec 14, 2021

:woah: If the vscode plugin had the capability to also open a png with an embedded excalidraw scene, and then save directly back to the png, that would make for an amazing workflow since all diagrams could live in git repos as PNGs only.

This would bring the plugin in line with the draw.io vscode plugin that also supports editing and saving back directly to .drawio.png files.

@pomdtr
Copy link
Collaborator

pomdtr commented Mar 20, 2022

This looks achievable with the latest version of the excalidraw library. However, I would need to implement a customEditorProvider inside VSCode, which looks harder to implement than the exisiting customTextEditorProvider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
No open projects
v1.3.0
Planned
Development

Successfully merging a pull request may close this issue.

4 participants