Hi Krasimir,
Greetings from Syncfusion support.
We have validated your requirement and its default functionality of browser. We can achieve this requirement from application end by calling In-place Editor - save() public method in JavaScript window.onbeforeunload event callback as follows.
Note: onbeforeunload trigger when leaving from current page (refresh too).
Index.js
Add index.js file with below code blocks and save it in wwwroot folder of your application. Then add this JS file reference into _host.cshtml
window.onbeforeunload = function () {
var editorObj = document.getElementById('TextEditor').ej2_instances[0];
if (editorObj.enableEditMode) { // To ensure whether editor in ediable mode
editorObj.save(); // Save the editor current value
}
};
|
We have prepared sample for your reference, get it from below link
Regards,
Pandiyaraj