spohlenz / tinymce-rails

Integration of TinyMCE with the Rails asset pipeline
Other
816 stars 258 forks source link

tinyMCE init with turbolinks fails #153

Open basschoen opened 10 years ago

basschoen commented 10 years ago

Thanks for this nice plugin. I have one issue regarding turbolinks after updating your gem. When I init the tinyMCE on dom ready, everything works fine when I refresh the page. However, when I click through my site and I come back on a page with a tinyMCE editor, it is not initialising. This occurred after updating your gem. When I lock my Gemfile to version 4.0.19 everything is working fine.

spohlenz commented 10 years ago

Hi @basschoen. This comment may have the answer you need: https://github.com/spohlenz/tinymce-rails/issues/145#issuecomment-49307568

basschoen commented 10 years ago

@spohlenz I noticed it, but it doesn't solve the problem

nguyenchiencong commented 10 years ago

+1

spohlenz commented 10 years ago

One thing I found when looking into #162 is that the JS script include tags need to be in the document head. Is this the case?

If it is already, are you able to upload a test app that demonstrates the issue?

nguyenchiencong commented 10 years ago

Actually I managed to solve the pb, it was due to a dom manipulation on Iframe that affected tinymce iframe. Thanks!

zimmski commented 9 years ago

I ran into this problem. @nguyenchiencong could you make a pull request so this issue gets fixed? The only way I know how to fix it right know is to call "tinyMCE.remove()" before .init but a working out-of-the-box solution would be better.