Uncaught Error: Could not find control by type: button-tinymce

I updated the rails app from 3.2.2 to 5.1.4. I upgraded tinymce to 4.7.9. But on every page I get this error on the console, and tinymce does not work there. Error on console:

Uncaught Error: Could not find control by type: button 

Gemfile

 gem 'jquery-rails' 

application.js

 //= require tinymce-jquery 

instruction / _form

 <%= tinymce_assets %> <p> <%= f.label :mt_inst %><br /> <%= f.text_area :mt_inst, :class => "tinymce", :rows => 40, :cols => 120 %> </p> <%= tinymce %> 
+5
source share
1 answer

I checked that this leads to an error for Rails 5, so you should download this tinymce-jquery from

https://cloud.tinymce.com/stable/tinymce.min.js

Then manually place it in the app / assets / javascripts / folder and request it with the file name in application.js

0
source

Source: https://habr.com/ru/post/1276088/


All Articles