rails 4 with CKeditor

后端 未结 6 784
死守一世寂寞
死守一世寂寞 2021-01-31 12:41

I cannot get the galetahub ckeditor gem to work with Rails 4 for me. I searched for any problems online but cannot find any. I\'m following the instructions exactly.

6条回答
  •  不知归路
    2021-01-31 13:09

    I have the same problem using rails 4 and apparently the problem is that the form helper

    form.cktext_area
    

    Or in your case

    f.input :description, as: :ckeditor
    

    it's not generating what it supposed to generate, and you don't have to load the editor manually, the only thing you need to do is to is to add the class 'ckeditor' to your textarea and it will load automatically, like this:

    f.cktext_area :body, :class => 'ckeditor'
    

提交回复
热议问题