Auto saving of RTE contents

Hello,

I am working with the website sample "Save the content of RichTextEditor control automatically when the control loses its focus".


This sample works if the user types or pastes content into the RTE.  But if the user inserts an image or link without clicking inside the RTE, the click event does not fire and the content does not save.

I have tried using focus, blur and change events, but these do not fire either.

Does anyone know of an auto save solution that will work in all use cases?

Thank you,
Randy Craven

Attachment: rteSample_c69e0c14.zip

3 Replies 1 reply marked as answer

MK Muthukrishnan Kandasamy Syncfusion Team June 8, 2020 08:25 AM UTC

Hi Randy, 
 
Thanks for contacting Syncfusion support. 
 
We have validated your reported problem in EJ RTE control. In that RTE customization document, we have bind the click event for iframe element of RTE. So, that when we insert the link or image then click event will not fire. For this scenario, we can use change event of RTE control. please refer the below code block. 
 
$("#rteSample").ejRTE({ 
            width: "100%", 
            showFooter: true, 
          change: function(args) { 
            //html string in iframe textarea 
            if (!isFocus) data = rteObj.getHtml(); 
            //maintain flag variable for element focused or not. 
            isFocus = true; 
          } 
        }); 
 
 
We have prepared sample for your convenience, please refer to the below link for the sample. 
 
 
Description 
Link 
Getting started 
How-to section 
API reference for RTE 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Muthukrishnan K 



Marked as answer

RC Randy Craven July 4, 2020 02:47 PM UTC

Hello,

To follow up, using the change event of the control to save upon insertion of an image or link did work.

Thank you,
Randy Craven


SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team July 6, 2020 01:22 AM UTC

Hi Randy, 
 
Thanks for the update. 
 
We are happy that our last provided solution met your requirement. Please, get back to us if you need any further assistance. We will be happy to assist you. 
 
Regards, 
Shameer Ali Baig S. 


Loader.
Up arrow icon