I\'m using the Ruby gem for CK Editor (https://github.com/galetahub/ckeditor) and I\'m getting this error:
Uncaught TypeError: Cannot read property \'langEnt
Remove the following line from application.js
// = require_tree ./ckeditor
The problem comes from the way rails compiles the assets. It generates one big js file and if your plugin.js code does not load before the files in the /lang it throws an error and stops the execution of the generated by rails big js file. This means if you have any js code past the point where the error occurred it won't be executed as well. Here is what helped me solve the problem:
//= require ckeditor/init
//= require ckeditor/config
//= require ckeditor/plugins/YOUR_PLUGIN/plugin // plugin.js in folder
//= require ckeditor/plugins/YOUR_PLUGIN/lang/en // en.js in folder
//= require_directory .
If you are using ckeditor-rails
In app/assets/javascripts/application.js
, add:
//= require ckeditor-jquery
and ensure that language value is like this:
config.language = 'en';
config.language_list = [ 'en:English', 'es:Spanish' ];