Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated toolbar #148

Open
edvasqueza opened this issue Nov 17, 2016 · 4 comments
Open

Duplicated toolbar #148

edvasqueza opened this issue Nov 17, 2016 · 4 comments

Comments

@edvasqueza
Copy link

edvasqueza commented Nov 17, 2016

I'm using Rails 5 with turbolinks, when I load the page it loads perfect. If I navigate anywhere else and then press the back button in my browser, the toolbar gets multiplied, as shown in the picture.

image

If I repeat the action I will get 3 toolbars, and so on.
My code is:
$(document).on('turbolinks:load', function () { window['rangy'].initialized = false; $('#news').wysihtml5({locale: "es-ES"}); }

I have another editor, this one using simple form as shown in the docs, but the multiplication happens even if I comment out one or the other. I would appreciate some help.

@Nerian
Copy link
Owner

Nerian commented Nov 18, 2016

Shouldn't you set 'rangy' to true instead of false?

@Nerian
Copy link
Owner

Nerian commented Nov 18, 2016

Nowadays I recommend https://github.com/summernote/summernote-rails since it updated more often.

The project from which this repo takes the code (https://github.com/bootstrap-wysiwyg/bootstrap3-wysiwyg) it's a little bit inactive. You may consider changing to summernote. I have no issue using turbolinks and summernote.

@khadzhinov
Copy link

Same issue for me.
I can fix that only with %meta{ name: 'turbolinks-cache-control', content: 'no-cache'} but it doesn't have any sense

@edvasqueza
Copy link
Author

More info here: http://stackoverflow.com/a/40660494/1886240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants