Auto-save contents of ejRTE
Thanks for using Syncfusion products.
[JavaScript] var rteObj, isFocus, data; $(function () { $("#rteSample").ejRTE({ width: "850px", showFooter: true, }); rteObj = $("#rteSample").data("ejRTE"); $("#" + rteObj.element[0].id + "_Iframe").contents().on("click", function () { //get html string in iframe textarea using getHtml() method if (!isFocus) data = rteObj.getHtml(); //maintain flag variable for element focused or not. isFocus = true; }); //when click the document or any other popup element append in body the document click will triggered $(document).click(function (e) { //validate the iframe is focused in previously or not, then made any changes in html string if (isFocus) { alert("content saved"); isFocus = false; } }); }); |
For your convenience, we have prepared a simple sample based on your requirement. You can also download the attached sample from the following location.
Sample: Sample
Please let us know if you have any queries.
Regards,
M.Manikandan
Thanks for the update
Please get back to us if you would require any further assistance.
Regards,
M.Manikandan
- 3 Replies
- 2 Participants
-
RC Randy Craven
- Apr 9, 2015 07:14 PM UTC
- Apr 15, 2015 04:23 AM UTC