Search code examples
javascripttinymce

How to disable TinyMCE confirm dialog


Does anyone know how to disable TinyMCE alerts, and confirms. The confirm in talking about says:

This page is asking you to confirm that you want to leave - data you have entered may not be saved Leave Page - Stay on Page

I've written my own stuff that detects if the page data has been change so I don;t want TinyMCE to worry. I found the function in the TinyMCE source so I'm about to overwrite it but I want to know if anyone knows a better way to accomplish this. Thanks.


Solution

  • To remove the message, just disable the autosave plugin, that's what adds the onunload prompt.

    Simply don't load the plugin in your TinyMCE initialization script.