Modifying Ckeditor with additional plugins in rails 3
ckeditor, ruby-on-rails
Solution
You can put all your plugins in the assets folder of your application.
Create a folder in `app/assets/javascript/ckeditor/plugins` and place all your plugin files here.
Problem
I installed CKeditor gem on my rails 3 application . Now I want to add some additional plugins to it . I looked up ckeditor documentation and it states that the plugin files need to go where ckeditor was unzipped. I am new to rails and I am trying to locate my ckeditor files but I can't find them in the app directory except the model files created when I installed ckeditor . Where should I place files for my custom ckeditor plugin to include them in editor on initialization ? EDIT : As per the answer below added plugin files in the mentioned directory. Trying to load the plugin with the following command in config.js for ckeditor : ``` CKEDITOR.editorConfig = function( config ) { CKEDITOR.plugins.addExternal('insert_blank','http://localhost:3000/assets/ckeditor/plugins/insert_blank/', 'plugin.js'); var temp = CKEDITOR.registered; alert(temp) ; config.extraPlugins = 'insert_blank' ; config.toolbar = [ { name: 'basicstyles', items : [ 'Bold','-','Italic' ] }, { name: 'insert', items : [ 'Image','insert_blank.btn' ] }, ]; config.toolbar.push(['insert_blank.btn']); config.height = 300 ; config.width = 300 ; config.removePlugins = 'elementspath,resize' ; }; ``` This is my plugin.js file : ``` CKEDITOR.plugins.add( 'insert_blank', { init: function( editor ) { editor.addCommand('InsertBlank', { exec function(editor) { editor.insertHtml( '__'); } }); editor.ui.addButton( 'insert_blank.btn', { label: 'Insert Blank', command: 'InsertBlank', icon: this.path + 'images/blank.png' } ); } } ) ; ``` I am giving an absolute path only because I am in dev , will change that later . The alert above produces 'not defined' . I checked my server log and the files are found by the application server . Looks like I am not able to add the plugin correctly to ckeditor . Any ideas as to what might be going wrong ? Update : There was some error with my plugin.js . Everything else is fine .