parpalak / upmath.me

Markdown and LaTeX online editor - create text for web with equations and diagrams
https://upmath.me/
MIT License
323 stars 40 forks source link

Can the artifacts be downloaded instead of being hosted to the server? #34

Closed iago-lito closed 5 months ago

iago-lito commented 11 months ago

Hello, and thank you for upmath :)

I am curious whether the parts rendered by i.upmath.me can be directly embedded into the resulting html code as <svg> tags or base64, instead of remaining hosted on the server?

parpalak commented 11 months ago

Hello,

Certainly, embedding parts from i.upmath.me directly into the resulting HTML code as tags is technically feasible. You can see it in action on the Upmath website itself:

image

iago-lito commented 11 months ago

Okay, thank you. So if I want to download this as the rendering result, I need to open the console and copy-paste it from there?

parpalak commented 11 months ago

This is a possible option, but not convenient. I'll think about how to simplify it.

iago-lito commented 5 months ago

Hello, and thank you for having addressed this :) I don't see a difference yet on the two-sided editor, and the html button still yields a document in which svg nodes are hosted at i.upmath.me. Maybe an alternate html-standalone button would be the easiest way to replace them by actual svg directives?

(still, I can always get this from the console as you showed)

parpalak commented 5 months ago

Apologies for any confusion – I forgot to mention that it operates in a not-so-obvious manner :) If you click on the download button within the "preview" tab, you'll receive an HTML markup with embedded SVG. The functionality of the other tabs remains unchanged. Previously, pressing the download button in the "preview" tab resulted in downloading the same markup as in the "html" tab. Thank you for your understanding!

iago-lito commented 5 months ago

Oh, great! So I just works out of the box now and we don't even need to think about it! Perfect. Thank you so much <3