We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Set HTML content

Hi, is there a possible to set a HTML content in DocumentEditor? Because, i have some of html content and i want to set in documenteditor and save in sfdt.

Thank you.

5 Replies

SM Suriya Murugan Syncfusion Team November 7, 2019 09:09 AM UTC

Hi S_Line, 

Thank you for contacting the Syncfusion support. 

In DocumentEditor, you can open html file using Syncfusion DocIO library. So, we need to write server side WebAPI either in Asp.Net MVC or Core to achieve your requirement.  
  
To open html file, we need to use Syncfusion.DocIO library  to convert the stream to document editor internal structure. Then convert the internal structure to json. Finally, open that json in document editor.   
  
In documenteditor, you can open the html file using open() method or if you want to insert html content at current cursor position, use paste(sfdt) method. 
  
For better understanding , we have prepared the sample for your requirement. Front end in Typescript and back end in ASP.NET Core. 
  
In below sample, 
1.      Open Html button click will open the html file from server. 
2.      Insert Html will allow you to insert content at current cursor position. 
3.      You can change it based on your requirement. 
4.      Using Ctrl + S or save method , you can save the document as Sfdt. 
  
Sample link: 
 
  
  
Note: Front End sample is depending on WEP API to open the document. So, you need to run both front end sample and ASP.NET Core Web API sample simultaneously.    

Regards, 

Suriya M. 



VC Venkatesh Chinthakindi February 21, 2022 01:41 PM UTC

Hey Team,

Converting sfdt text into Html text will be resulting different style especially bullet points(Diamond, Square, Arrow etc...) turning into simple bullet point (disc).

Due to which we stopped using syncfusion.



SM Suriya Murugan Syncfusion Team February 22, 2022 10:47 AM UTC

Hi Venkatesh,


Apologies!


We are internally using Syncfusion DocIO for html conversion. Currently DocIO doesn’t provide full-fledged support for list format in Word to HTML conversion. We have already logged this requirement as feature request in our database. We don’t have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features. We will let you know when this feature is implemented.

The status of this feature can be tracked through the below link:

https://www.syncfusion.com/feedback/3196/preserve-all-html-compatible-list-properties-in-word-to-html-conversion


Currently we are only have the following list format support in Doc to HTML conversion.

1. Decimal (1,2,3,4….etc.,)

2. Roman - lower case (i,ii,iii,iv,….etc.,)

3. Roman - upper case (I,II,III,IV,…..etc.,)

4. Alphabet – lower case (a,b,c,d,……etc.,)

5. Alphabet – upper case (A,B,C,D….etc.,)

6. Bulleted list(.)

Please let us know if you have any other questions.


Regards,

Suriya M.



VC Venkatesh Chinthakindi February 22, 2022 11:29 AM UTC

Hey Team,

Then stop promoting or telling us to use your product, Which false statements making us to loose business as the end users not at all happy with this. They are opening docx files in Document editor and looks fine except few issues but when we render the same in html user experience is too worst and they stop using my product due to your product.



SM Suriya Murugan Syncfusion Team February 24, 2022 08:27 AM UTC

Hi Venkatesh,


Apologies!


Please follow up this feature through the ticket created by under your account. Currently, we are checking the possibility and will update details through ticket.


Regards,

Suriya M.


Loader.
Live Chat Icon For mobile
Up arrow icon