spohlenz / tinymce-rails

Integration of TinyMCE with the Rails asset pipeline
Other
813 stars 256 forks source link

Uncaught ReferenceError: TinyMCERails is not define #252

Closed poonkodi123 closed 5 years ago

poonkodi123 commented 5 years ago

Im using rails5 and ruby-2.5.1

Also try to follow this guide, with same results : https://alexanderpaterson.com/posts/using-the-tinymce-text-editor-in-a-rails-application

As i'm not able to find a solution (didn't find anything in the issues), i open a new issue.

spohlenz commented 5 years ago

It looks like the tutorial at https://alexanderpaterson.com/posts/using-the-tinymce-text-editor-in-a-rails-application is somewhat out of date.

The tinymce-rails gem has its own tinymce.js file which sets up the TinyMCERails module, and by creating app/assets/javascripts/tinymce.js this file is overridden.

If you want to continue with that tutorial, change the file name to something else, e.g. app/assets/javascripts/editor.js.