I'm currently trying to get the "wordcount" plugin working with TinyMCE for jQuery. I'm not using any other TinyMCE plugins at the moment. Based on the limited TinyMCE documentation that I've been able to find, this should be a straightforward option that gets added to the TinyMCE init, but this config is not loading anything at all. I've searched high and low for tips as to what might be the problem, but cannot find anything. (I'm well aware of how terrible the documentation for TinyMCE is)
The form is being rendered from Rails 3.2.12, the jQuery plugin for TinyMCE is included in the asset pipeline in my application.js file, and I'm using the following coffeescript code to init the TinyMCE editor:
$('main_form').find('textarea.wysiwig').tinymce
script_url: '/assets/tinymce/tiny_mce.js',
plugins: "wordcount",
content_css : '/assets/editor.css',
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,bullist,numlist",
theme_advanced_buttons2 : "wordcount",
theme_advanced_buttons3 : "",
valid_elements: "strong/b,em/i,ol,ul,li,br"
I've included the wordcount in the second button set in order to try to isolate what is happening, but this produces the following JS error within TinyMCE: "Uncaught TypeError: Cannot read property 'Button' of undefined" (I'm using Chrome to test and the editor works fine without the plugin option)
Any pointers on what to try or whether it just doesn't work would be great to hear.