Html and Mathml

Hello, 


I have a string containing a piece of html code (simple tags like <p> <b> <i> <table> <img> <br>) and some MathML code (tag <math>). How can I import this string in a new Word document, so that it's rendered correctly? Especially the MathML code. 

Thanks! 


1 Reply

HC Hemalatha Chiranjeevulu Syncfusion Team July 19, 2021 10:48 AM UTC

Hi Paolo,

Thank you for contacting Syncfusion support.

Regarding HTML
From the details, your requirement is to import the html string and MathML in the Word document. You can insert the html string in the Word document by using AppendHTML API of DocIO. Please refer the below UG to know how to insert HTML string in Word document using DocIO
https://help.syncfusion.com/file-formats/docio/html#customizing-the-html-to-word-conversion

Regarding MathML
Currently, we don’t have support to import the MathML (tag<math>) in the Word document. So, it is not possible to import the string which contains mathml in the Word document. But, you can create desired equation in Word document using DocIO. Please refer the below link to know how to create mathematical equation in Word document using DocIO:
https://help.syncfusion.com/file-formats/docio/working-with-mathematical-equation

We have prepared the sample application to import the html string in Word document and to create an equation in Word document. Please refer the below sample application at your end to achieve your requirement
https://www.syncfusion.com/downloads/support/forum/167350/ze/InsertHTMLString-701259437

Please let us know if you have any other questions.

Regards,
Hemalatha C


Loader.
Up arrow icon