iink SDK Web

Answered

How to get access to the generated output

When I'm integrating MyScript MathWeb with my web application, I want to read the Latex Strings generated. Can anyone please help me to do this?

Please let me know how can we access the generated LaTex strings output. Thanks


Best Answer

Dear Mukunda,


Thank you for your update.


It seems that you have a problem in the display of the SVG patches sent by the server and representing the strokes

This could be due to a style problem. We recommend you inspecting your DOM to see why the SVG patches are not visible in your browser view.


Regards,


Gwenaëlle


Dear Mukunda,


Thank you for your question.

If you are starting a new Web project, we recommend you using myscriptJS rather than the Web components.

You can refer to the following Math example based on Web socket : Demo is available here and the source code is here.


Please refer to the source code and find below some comments about the code:

To have the recognition in LaTeX you should configure the export mime type to mimeTypes: ['application/x-latex']

By default, an exported event is fired every time some content is recognized on the server side. So you will be able to get the exported results by listening to the ‘exported’ event. See the editorElement.addEventListener('exported', function (evt) ... ) call


Best regards,


Gwenaëlle


Thank You for your help and response Gwenaelle. This really helped me a lot to understand the flow of MyScript and implementing it in our own product. 

But, there is another error occurring, when I first try to scribble or draw something on the editor canvas, the words I'm drawing are not getting displayed but MyScript is capturing it and generating the output. This keeps happening for a while but after a couple of refresh on-page, the drawn text on canvas starts getting displayed. Watch the below video for your reference.

https://www.loom.com/share/e6880f73ffe3420b8be2284a150c0b5b


Can you please comment on this and tell us any reason which can cause such an issue? Any help will be appreciated. 

Awaiting your response. Thanks :)

Answer

Dear Mukunda,


Thank you for your update.


It seems that you have a problem in the display of the SVG patches sent by the server and representing the strokes

This could be due to a style problem. We recommend you inspecting your DOM to see why the SVG patches are not visible in your browser view.


Regards,


Gwenaëlle

Thanks for the help Gwenaelle.

Yes, the issue was with the style and some DOM code. It is fixed now and is working properly.

Thank you so much for this suggestion. :)


Regards,

Mukunda