Closed holden closed 10 years ago
How are you including the TinyMCE assets (application.js or via the tinymce_assets
helper)?
application.js
//= require tinymce-jquery
Does the following work in your application.js?
//= require tinymce
I'll have to look into what the TinyMCE libs are doing when jQuery integration is added.
I tried to use both
//= require tinymce-jquery
and
//= require tinymce
But helper method don't work.
In Rails 3.2, it seems the javascript include tag is placed at the bottom of the file and not at the top. The tinymce helper needs to be placed AFTER the JS gets loaded or needs to be re-written to ensure it gets loaded before calling the init method.
I get undefined method tinymce
in RSpec when it tests views with <%= tinymce %>
in it despite it working perfectly in development. Why would this be?
@pawel2105 Are you adding the tinymce-rails gem to the assets group in your Gemfile, or in the global group? Make sure it is in the global group.
@spohlenz I was. I hadn't restarted Spork which was causing the issue.
Faced with the same issue. Solution: Just put '//= require tinymce-jquery' above '//= require_tree .' For example: '//= require jquery' '//= require jquery_ujs' '//= require jquery-ui' '//= require tinymce-jquery' '//= require_tree .'
In that case '<%= tinymce %>' helper works as it should.
The helper <%= tinymce %> which generates:
returns a 'tinyMCE is not defined' error.
It works fine when I call it directly. ie:
I'm guessing this is a bug?