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

How can I make an AJAX call to save data/html of RTE

 

 

 

 

Description:

We can use getHtml method to get the HTML string from the RTE and get the content as string using getText method in client side and pass the value to the controller using AJAX post call.

Solution:

Render the RTE as follows

CSHTML

 

Upon clicking to the button “Store Text”, the corresponding storeText function will be triggered, this get the text from RTE and use AJAX POST to pass the text value of RTE to controller’s post action.

Javascript

 

 

 

Upon clicking to the button “Store HTML”, the corresponding storeHTML function will be triggered, this get the HTML from RTE and use AJAX POST to pass the HTML value of RTE to controller’s post action.

Javascript

 

In store function, the AJAX post call is defined as follow

Javascript

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
7094 09/06/2016 09/06/2016 ASP.NET MVC RichTextEditor
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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