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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

setHtml getHTML

Thread ID:

Created:

Updated:

Platform:

Replies:

145597 Jun 30,2019 12:32 PM UTC Jul 2,2019 12:41 PM UTC Vue 1
loading
Tags: RichTextEditor
William Morgenweck
Asked On June 30, 2019 04:55 PM UTC

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 


Christopher Issac Sunder K [Syncfusion]
Replied On 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 


CONFIRMATION

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