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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is there a way to insert HTML element at the current cursor location?

Thread ID:





150939 Jan 24,2020 11:55 PM UTC Jan 27,2020 09:18 AM UTC JavaScript - EJ 2 1
Tags: DocumentEditor
Asked On January 24, 2020 11:55 PM UTC

Trying to insert HTML element e.g like DIV element at the current cursor location? could not find any example. 

Any help much appreciated 


Harini Chellappa [Syncfusion]
Replied On January 27, 2020 09:18 AM UTC

Hi Sampurnima, 

Syncfusion Greetings! 

Currently document editor doesn’t provide option to insert html content in document editor. 

As a workaround, you can convert the html to docx using DOCIO, and docx to sfdt using word editor.  

Please refer the below documentation for HTML to Docx conversion. 

·       Using paste(sfdt) API in editor module, you can insert a document (extract the document and insert element contains paragraph and table) at current cursor position. 
·        You can pass return server Sfdt string in this method. 
Code snippet

Harini C 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon