Open tobidelius opened 11 years ago
I got it working by putting the plugin (youtube in my case) in /app/assets/javascripts/ckeditor/plugins/
and added it to my config in app/assets/javascripts/admin/ckeditor.js.coffee
:
$ ->
config =
language: 'en'
entities_latin: false
forcePasteAsPlainText: true
height:'400px'
format_tags: 'h2;h3;p'
extraPlugins: 'youtube'
toolbar:[
['Source'], ['Format'], ['Undo','Redo', '-', 'PasteText'],
['Bold','Italic','Underline','Strike'], ['NumberedList','BulletedList','-','Blockquote', 'HorizontalRule'],
['Link', 'Unlink', 'Anchor'], ['ShowBlocks'], ['Youtube']
]
$('.ckeditor').ckeditor (->), config
Can you add multiple plugins? I tried adding the codesnippet plugin with its dependencies and am getting the error "Uncaught TypeError: undefined is not a function" in my javascript console, pointing to the following line: CKEDITOR.style.addCustomHandler( {
Putt plugins to /vendor/assets/javascripts/ckeditor/plugins
Add to assets.rb
:
# ckeditor_rails additional plugins, skins
Rails.application.config.assets.precompile += Dir.glob(Rails.root.join('vendor', 'assets', 'javascripts', 'ckeditor', '**', '*')).select{ |e| File.file? e }
Add to config.js
:
config.extraPlugins = 'first_plugin, second_plugin'
Not working for me.. i added confighelper extra plugin and add in to my config.js like this config.extraPlugins = 'confighelper'; i got Encoding::InvalidByteSequenceError: "\xED" followed by "n" on UTF-8 (in /home/vishal/.rvm/gems/ruby-2.3.1/gems/sprockets-3.6.3/lib/sprockets/utils.rb:106:in `encode') this error in console..
Not worked for me also!
How do one add custom plugins to the ckeditor with this gem?