Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding plugins #33

Open
tobidelius opened this issue Sep 5, 2013 · 5 comments
Open

Adding plugins #33

tobidelius opened this issue Sep 5, 2013 · 5 comments

Comments

@tobidelius
Copy link

How do one add custom plugins to the ckeditor with this gem?

@henrrrik
Copy link

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

@ttseng
Copy link

ttseng commented Jan 23, 2015

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( {

@galikhanov
Copy link

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'

@vishaltps
Copy link

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..

@thiyagarajan
Copy link

Not worked for me also!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants