Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3ba7866 to
e87c560
Compare
Collaborator
Author
|
Hi @NaoCoding , please help me review this pr! |
NaoCoding
requested changes
Nov 27, 2025
Collaborator
NaoCoding
left a comment
There was a problem hiding this comment.
Hi @pubuzhixing8 , is this a bug or it is normal behavior.
While I draw some lines on the board
The export svg does not show anything.
Collaborator
Author
|
@NaoCoding I don't know what happen, all vector-line, mind, flow chart, image are expected in my local environment. |
NaoCoding
approved these changes
Nov 27, 2025
Collaborator
NaoCoding
left a comment
There was a problem hiding this comment.
Hmmm. LGTM. I'll try to find out is there any potential issue.
I think it's ok to merge first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR exports a new
toSvgmethod, enabling developers to programmatically export canvas content as an SVG file.We can implement the feature plait-board/drawnix#278.
Previously, the
toImagefeature was already implemented using an SVG-based solution. This change simply extracts the core SVG generation logic into a standalone, publicly availabletoSvgDatamethod line191.Additionally, I've optimized the inline HTML style handling to reduce SVG file size by omitting unnecessary styles for display purposes:
Selective Style Cloning: Instead of cloning all inline styles, only specific styles defined by the caller are now copied. This allows developers full control over which classes and styles are included 1.
Direct Text Style Transfer: Text styles from the Slate editor framework are cloned directly to ensure consistency 2.