A
A
Alexander Petrov2017-02-01 23:54:10
Ruby on Rails
Alexander Petrov, 2017-02-01 23:54:10

Why does Ckeditor work weird?

I connect in ruby ​​on rails ckeditor.
1) I include js - //= require ckeditor/init
2) I write a helper - <%= cktext_area :content, value: 'Default value', id: 'sometext' %>
The result is this:
d025bc36deab4fdcb17f91ded34d9793.png
The source code looks like this
f2e7c3a2fde0495f8347ddbb51d5382c.png
: as if the tags are not inserted correctly, break off and everything breaks in the end. What to do with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Demidenko, 2017-02-02
@Mirkom63

Because the first 2 parameters are object_name, method or use on form_builder only with the method
Source code one and two , as your own and in other helpers in rails text_field for example So
you have two options:
or

<%= form_for @object do |form| %>
  <%= form.cktext_area :content %>
<% end %>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question