Skip to content

Instantly share code, notes, and snippets.

@lappi-lynx
Last active January 29, 2016 12:18
Show Gist options
  • Save lappi-lynx/b067167cf00b9aa153b4 to your computer and use it in GitHub Desktop.
Save lappi-lynx/b067167cf00b9aa153b4 to your computer and use it in GitHub Desktop.
CKeditor custom tollbar in rails 4
// Create /app/assets/javascripts/ckeditor/config.js file:
CKEDITOR.editorConfig = function( config )
{
config.toolbar = 'MyToolbar';
config.toolbar_MyToolbar =
[
{ name: 'document', items : [ 'NewPage','Preview' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','Scayt' ] },
{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'
,'Iframe' ] },
'/',
{ name: 'styles', items : [ 'Styles','Format' ] },
{ name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote' ] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'tools', items : [ 'Maximize','-','About' ] }
];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment