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

SVG text editing specification #911

Open
MewPurPur opened this issue Sep 14, 2024 · 0 comments
Open

SVG text editing specification #911

MewPurPur opened this issue Sep 14, 2024 · 0 comments
Labels

Comments

@MewPurPur
Copy link
Owner

Retrieved from #687 which had a lot more discussion points that are mostly resolved now

Importing an SVG should update the underlying SVG text and clear the undo history. Except, if the file is the same as the current one, don't clear the history. Moreover, if the text would also be unchanged, throw a dialog like "Note: The imported SVG is identical to the currently edited one." and don't create any UndoRedo actions.

If importing or resetting makes it so the new text gives parser errors, don't par

When not focused, the SVG Code Editor should always reflect the underlying SVG text. Any changes to the text while it's not focused clear its undo history.

When focused, the text should only change how the user edits it. It would no longer reflect the underlying SVG text. Every time the user edits the text, it would be passed to the SVG Parser. If there's an error, don't change the underlying SVG text, keep the old one. If there's no error, feed the TagSVG representation back into the SVG Parser and use the returned text as an underlying SVG text.

When you click away, the SVG Code Editor should go back to reflecting the underlying SVG text. If this change resulted in any difference, that should count as a single UndoRedo action, and should be the only kind of external change that doesn't clear the SVG Code Editor's undo history.

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

No branches or pull requests

1 participant