クライアントの情報をその場で編集するために best_in_place gem を使用しています。
私の質問は、このコンテンツを HTML として編集するために WYSIWYG エディターを統合するにはどうすればよいですか? 現在、このエディターを使用しています: https://github.com/Nerian/bootstrap-wysihtml5-rails/
私はjavascriptとcofeescriptが苦手なので、おそらく何か間違ったことをしています。
ビュー内の私のコード:
<%= best_in_place @client, :info, :type => :textarea, :nil => "Click here to add content!", :html_attrs => { class: "wysihtml5" }, :sanitize => false %>
そしてclients.js.cofee
$(document).ready ->
# Activating Best In Place
jQuery(".best_in_place").best_in_place()
# Loading editor
$(".wysihtml5").each (i, elem) ->
$(elem).wysihtml5()
誰かがそれについて何をすべきか知っていますか?
ありがとう