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 us
It could be a simple indentation issue of coffeescript. Just indent the lines below $(document).ready -> by a tab.
$(document).ready ->
# Activating Best In Place
jQuery(".best_in_place").best_in_place()
# Loading editor
$(".wysihtml5").each (i, elem) ->
$(elem).wysihtml5()
To validate further, copy your code in the coffeescript frame @ http://js2coffee.org/: the resulting javascript should look like this:-
$(document).ready(function() {
jQuery(".best_in_place").best_in_place();
$(".wysihtml5").each(function(i, elem) {});
return $(elem).wysihtml5();
});
That is, the plugins should be called after the dom is loaded.