Open gazayas opened 6 years ago
What gem version are you using? Your example seems to work fine for me with tinymce-rails 4.7.9.
Yeah, running 4.7.9 I tried it with a 3.x version and the same thing happened.
Must be something over here. I'll look a little deeper into it.
The error looks like this by the way:
Hmm, going through my commits it definitely seemed to be the version change. I was running 4.4.1 earlier according to gemfile.lock Started having issues when it bumped up to 4.7.9 But like I said I tried it with 3.5.11.1, and it said ed. is not a function too.
Strange. Anyways I put this in my gemfile and it's working without changing any of the code, so I'll stick to it:
gem 'tinymce-rails', '~> 4.4.1'
Sorry for the trouble!
When doing setup in the
tinymce.yml
file or directly on the page withtinymce.init({ ... })
, it will log the editor to the console:but if I try to use
ed.on()
it just says that ed.on is not a function.If I remove
setup
, the editor shows up just fine. I also uninstalled the gem and just used tinymce hardcoded into the view, and it works just fine with setup and ed.onHere's how my
tinymce.yml
file looks like: