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
close icon

ejRTE seem to not register the last character that was typed

Using the following code:

f.ejRTE({
   "value": contentItem.value,
   change: function(args) {
      console.log("notes changed", args.htmlText);
      contentItem.value = args.htmlText;
   }
});

You will notice that the change() function will log the current contents of the editor every time that you type something. However, it will always be one character behind what you type, resulting in the last character typed to not be saved.

Example - you type: 

"The brown fox jumps"

You will save (the last "s" is not included):

"The brown fox jump"

A bug? Any work around?

Thanks

1 Reply

HP Harikrishnan P Syncfusion Team April 8, 2014 04:37 PM UTC

Hi Xander,

Sorry for the inconvenience caused. We have identified this as a bug, and logged an issue report on this. Fix for this issue will be available in our upcoming release which is going to be rolled out in a week or two.

You can try like this as a workaround,

            var rteObj,contentItem = "The brown fox jumps";

            $(function () {

                $("#rteSample").ejRTE({

                    "value": contentItem,

                    keyup: function (args) { // Keyup event

                        console.log("notes changed", rteObj.getText());

                        contentItem = rteObj.getText();  //Gets the current value of RTE

                    }

                });

                rteObj = $("#rteSample").data("ejRTE");

            });

Log the values of the RTE in the Keyup event. Use the getText() method to get the current values in RTE.

 

Please Let us know if you have further queries,

Regards,

HariKrishnan.


Loader.
Live Chat Icon For mobile
Up arrow icon