Open n-studio opened 10 years ago
@n-studio @marjinal1st
Hi guys - I'm still having the turbo-links issue... I've tried the workaround above and the issue still seems to persist. Any fix as of yet?
MY WORKAROUND:
I simply used https://github.com/rails/turbolinks#opting-out-of-turbolinks to opt out of turbolinks for all links which lead to the editor. A really cheap workaround but it does at least do the trick.
Sorry but I'm not using Turbolinks in my projects, so I don't really know how to fix it :disappointed:
No problem, my workaround does the trick. I doubt your average user would even notice the odd pageload.
Thanks for taking the time to reply though.
I'm currently using turbolinks 5.0.0-beta4 and the only thing you need to do is:
var all_medium_editors = null;
$(document).on('turbolinks:before-render', function(){
if(all_medium_editors != null) {
all_medium_editors.destroy()
}
})
$(document).on('turbolinks:load', function(){
all_medium_editors = new MediumEditor('.editable', {
// options go here
});
})
Hope it helps.
@rubentrf I've added your solution as a Wiki page, here.
Hi! The bug is reproducible with: https://github.com/marjinal1st/medium-test
Changing page prevents the tooltip from being displayed.
Workaround:
I still don't know if the workaround is clean enough and doesn't produce unwanted bugs.