I'm using best_in_place gem to editing client's info in-place.
My question is, how can I integrate a WYSIWYG Editor for editing this content as HTML? I'm currently using this editor: https://github.com/Nerian/bootstrap-wysihtml5-rails/
I'm not good at javascript and cofeescript, so I'm probably doing something wrong.
My code in view:
<%= best_in_place @client, :info, :type => :textarea, :nil => "Click here to add content!", :html_attrs => { class: "wysihtml5" }, :sanitize => false %>
And clients.js.cofee
$(document).ready ->
# Activating Best In Place
jQuery(".best_in_place").best_in_place()
# Loading editor
$(".wysihtml5").each (i, elem) ->
$(elem).wysihtml5()
Does anyone knows what to do about it?
Thanks