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

data-no-turbolink not works #77

Open
BrunoQuaresma opened this issue Jul 31, 2016 · 2 comments
Open

data-no-turbolink not works #77

BrunoQuaresma opened this issue Jul 31, 2016 · 2 comments

Comments

@BrunoQuaresma
Copy link

When i load a second page with ckeditor it is still broken.

<div class="form-group" data-no-turbolink>
  <label for="">Conteúdo da aula</label>
  <p class="form-text text-muted">
    Quer dar mais explicação sobre o conteúdo? Basta utilizar o espaço abaixo.
  </p>
  <%= f.cktext_area :content, cols: 40, ckeditor: { toolbar: 'mini' } %>
</div>
@tonyhsu23
Copy link

As #28 mentioned,
maybe try to reload ckeditor with script
so that you don't need to do anything about turbolinks.
something like...

<%= f.cktext_area :content, id: “ckeditor” %>
$(document).on(‘ready page:load’, function () {
  CKEDITOR.replace(‘ckeditor’);
});

@Shwetakale
Copy link

@BrunoQuaresma I think you need to add data-no-turbolink to the link from which ckeditor is loading and not to the form-group on which it is initialized. I tried following and its working fine for me

 %li= link_to "New Recipe", new_recipe_path, data: {"no-turbolink" => true}

and I have ckeditor on new recipe page. Hope this helps.

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