math-api icon indicating copy to clipboard operation
math-api copied to clipboard

Using SVG string of the end url in a JavaScript file

Open imaphatduc opened this issue 3 years ago • 2 comments

Is there any way to parse the html of the end url to a string? I'm trying to use the raw svg string in my library and find no api to achieve this.

I tried to call ajax() method of jQuery, but it seems like the website do not include the Access-Control-Allow-Origin header.

imaphatduc avatar Jun 29 '22 10:06 imaphatduc

What do you mean by "the end URL"? You can directly use MathJax npm module to generate SVG string by the way.

uetchy avatar Jul 15 '22 04:07 uetchy

By end url I mean something like this: https://math.vercel.app/?from=any-tex-string.

Yeah I can directly use MathJax npm module but the imported package size is just massive to achieve such a small goal. Can you build some kind of an API to grab the generated SVG string?

imaphatduc avatar Jul 15 '22 10:07 imaphatduc