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

setHtml getHTML

I'm starting to implement the RTE and I'm looking for the "Approved" method to pull data from a database and save it back.  The RTE will only save a small portion of HTML that will be used in other areas of my application.  I saw the getHTML in the documentation https://ej2.syncfusion.com/vue/documentation/api/rich-text-editor/#executecommand but not a setHTML But when I search for setHTML I see it for other languages.  Don't need images yet but will need to include them soon.

Also I tried to look at the javascript documentation for the same control and the page will not load.

https://ej2.syncfusion.com/javascript/demos/#/material/rich-text-editor/events.html will not load. 

Do you happen to have a small sample of using the RTE inside a v-dialog?  I can get the RTE to show up and function on a clean page but when I put it into a v-dialog it locks up the browser.  I'm not sure if it is because I have added the
inside a v-layout.

Thanks for your help 


1 Reply

CI Christopher Issac Sunder K Syncfusion Team July 2, 2019 12:41 PM UTC

Hi William, 

Greetings from Syncfusion support. 

Please find the replies for your queries, 

Query – 1: Need setHTML  to save it back to database 

You can get the RichTextEditor’s content using the following method and property. 

getHtml – this method returns the HTML content from RTE
https://ej2.syncfusion.com/javascript/documentation/api/rich-text-editor/#gethtml

 
value – this property returns the value of the RTE control as HTML string
https://ej2.syncfusion.com/javascript/documentation/api/rich-text-editor/#value 

Using the above API you can get the RTE’s content and save it. To load the saved content into RTE control, you can use the value property and set the HTML string from the saved location into the control. Since the content is HTML formatted string, the images can be saved and loaded in the control later. 

Query -2 : https://ej2.syncfusion.com/javascript/demos/#/material/rich-text-editor/events.html will not load. 
 
Since that particular name of the sample is modified in our latest release, the previous link is not loading at your end. You can get the same sample in the below link, 

Query – 3: Do you happen to have a small sample of using the RTE inside a v-dialog? when I put it into a v-dialog it locks up the browser. I'm not sure if it is because I have added it inside a v-layout. 

We have checked with v-dialog and prepared a sample to have our RichTextEditor inside the v-dialog. Also, we have v-layout and added the RTE inside that. But, we are unable to reproduce the issue you have reported. Please check with the below simple sample for reference, 


Please check with the above sample and get back to us with a reproducible sample or modify the given sample to reproduce the issue.  

Thanks,
Christo 


Loader.
Live Chat Icon For mobile
Up arrow icon