admin管理员组文章数量:1290418
When I navigate to a page with TinyMCE it displays regular textareas until I refresh the page because of turbolinks. This is a pretty well-documented issue and people generally remend some form of the following:
$(document).on('page:change', function () {
<code here>
});
I've tried every variation on this to no avail.
When I navigate to a page with TinyMCE it displays regular textareas until I refresh the page because of turbolinks. This is a pretty well-documented issue and people generally remend some form of the following:
$(document).on('page:change', function () {
<code here>
});
I've tried every variation on this to no avail.
Share Improve this question asked Nov 11, 2016 at 14:21 Danny SantosDanny Santos 1,1602 gold badges11 silver badges33 bronze badges1 Answer
Reset to default 13The problem was that a lot of the discussion around this issue is quite outdated and doesn't take into account that turbolinks events have changed as of 5.0.0.
I was able to solve the problem with the following:
$(document).on('turbolinks:load', function () {
tinymce.remove();
tinymce.init({selector:'.tinymce'});
});
A full list of turbolinks events can be found here
本文标签: javascriptTinyMCEhave to refresh the pageStack Overflow
版权声明:本文标题:javascript - TinyMCE - have to refresh the page - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741495927a2381837.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论