How to refresh tinymce iframe?

家住魔仙堡 提交于 2019-12-22 04:36:09

问题


How can I refresh the tinymce content or refresh the tinymce iframe using jquery?


回答1:


This code is used to refresh tinymce:

tinyMCE.execCommand("mceRepaint");



回答2:


You can use this statement to refresh (replace) the content:

editor.execCommand('mceSetContent', false, html);

Or if you want to make sure the dirty flag is cleared:

editor.execCommand('mceSetContent', false, html);
editor.startContent = tinymce.trim(editor.getContent({ format: 'raw' }));
editor.isNotDirty = true;
editor.nodeChanged();


来源:https://stackoverflow.com/questions/4324653/how-to-refresh-tinymce-iframe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!