Search found 4 matches

by Philippe
Fri Mar 19, 2021 3:07 pm
Forum: Miscellaneous
Topic: Save document using onRequestClose method
Replies: 2
Views: 130

Re: Save document using onRequestClose method

We've decided to go with auto save. However, in the onResquestClose method, we should be able to tell the browser to alert the user that the document has changed. The browser does it by itself when the onRequestClose method is not implemented. That would leave the user a chance not to save the docum...
by Philippe
Tue Mar 16, 2021 2:38 pm
Forum: Miscellaneous
Topic: Save document using onRequestClose method
Replies: 2
Views: 130

Save document using onRequestClose method

Hello,

We use onRequestClose method to close the editor :
  • Is there a way to know if the document has changed but not saved ?
  • Is there a way to save the document ?
Thanks.
by Philippe
Tue Mar 16, 2021 10:58 am
Forum: API
Topic: Differentiate between using the close button and closing the browser
Replies: 3
Views: 159

Re: Differentiate between using the close button and closing the browser

I've found a solution that works for me : var onRequestClose = function() { var xhttp = new XMLHttpRequest(); xhttp.open("GET", "url_that_sets_a_global_variable", false); // Synchronious call ! The variable will be handled by the callback page on status 4. xhttp.send(); docEditor.destroyEditor(); //...
by Philippe
Tue Mar 09, 2021 4:42 pm
Forum: API
Topic: Differentiate between using the close button and closing the browser
Replies: 3
Views: 159

Differentiate between using the close button and closing the browser

Hello,

when closing the editor, without modifying the document, is there a way, in the callback function, to differentiate between
  1. using the close button
  • navigating away, closing the tab, etc.
Both trigger the callback with status 4.