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

TextAnnotations - fromHtml and toHtml #7682

Closed
claudiaareneee opened this issue Feb 10, 2025 · 2 comments
Closed

TextAnnotations - fromHtml and toHtml #7682

claudiaareneee opened this issue Feb 10, 2025 · 2 comments
Labels
drawing-production enhancement New feature or request

Comments

@claudiaareneee
Copy link
Contributor

Is your feature request related to a problem? Please describe.

It would be really great if I could create a TextAnnotation from parsing HTML. This would help us with things like interpreting the text editor, copy and paste, etc. It's kind of a big item.

I know that certain properties would be lost, and I'm doubt we could ensure styles stayed the same. But for a big picture skeleton, it would be nice to be able to convert between the two.

Describe the solution you'd like

  • Individual runs have toHtml and fromHtml methods
  • The top level TextAnnotation should also have these methods that recurse throught the TextBlock to construct a corresponding HTML block of text
@pmconne
Copy link
Member

pmconne commented Feb 10, 2025

This sounds like outside the scope of the core packages. Do technical limitations (e.g., data not exposed publicly) prevent you or someone else from implementing this?

@claudiaareneee
Copy link
Contributor Author

Not that I can think of. We could do this in our own app, I just thought it made more sense to do it here as a helper function. Feel free to close this if you feel it doesn't fit.

@pmconne pmconne closed this as completed Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
drawing-production enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants