我有一个专有插件,可以在编辑帖子页面上创建一个元框。当插件管理的数据被编辑并且用户导航离开时,我们希望用户被提示为Wordpress(或者是TinyMCE?)现在编辑文章正文时执行。理想情况下,如果用户修改metabox和post内容,则会提示他们一次。
Is there an API which allows us to activate Wordpress\' (or is it TinyMCE\'s?) dirty flag?
我知道this similar question and the answer whcih建议代理beforeunload事件。