2

I'm using the tinymce-rails in my Ruby on Rails application and I wanted to add syntax highlighting to TinyMCE then i found this plugin https://github.com/grena/codehighlighting-for-TinyMCE and added it to app/assets/javascript/tinymce/codehighlighting. also added to tinymce.yml like this:

theme_advanced_buttons3_add:
  - codehighlighting
plugins:
  - codehighlighting

but when I load the view with the form with tinymce I get:

TypeError: 'undefined' is not an object (evaluating 'ed.onNodeChange.add')

Did I something wrong ? or the plugin is not up to date?

Mr_Nizzle
  • 6,644
  • 12
  • 55
  • 85
  • hi could you show some code of view and please tell where you have placed the plugin and how you are loading it in assert pipelining(load path)? – Sachin Singh Aug 16 '13 at 03:51

1 Answers1

1

You cannot add the plugin just like that since tinymce-rails only uses plugins included in the gem. You can find it here : https://github.com/spohlenz/tinymce-rails/tree/master/vendor/assets/javascripts/tinymce/plugins

So it's better that you should suggest the owner of this gem add your plugin, or better make a fork, add your plugin there and send a PR to them. It should work.

Dzung Nguyen
  • 9,152
  • 14
  • 65
  • 104