bergie / hallo

Simple rich text editor (contentEditable) for jQuery UI
http://hallojs.org/
MIT License
2.43k stars 318 forks source link

using hallo in rails 4 #221

Open mpepito13 opened 10 years ago

mpepito13 commented 10 years ago

Hi there,

I'm trying to use Hallo.js within a rails project but I can't figure how I can do that.

I've downloaded the latest hallo.js and move it into vendor/assets/javascripts When I reload my browser, I encounter the following error : TypeError: 'undefined' is not a function (evaluating 'jQuery.widget')

which point to the code at the very beginning of the file :

return jQuery.widget('IKS.hallo', {

I've seen some gem hallo_rails but the js code is not up to date…

I'm sorry if this is a newbie question…

best regards, arnaud

johnlane commented 9 years ago

For anyone wanting to use this with Rails, it's easy. See here. Just put the Javascript in your assets. Don't bother messing around with the various gems (hallo and hallo-rails) - they contain outdated code and don't seem to be maintained.