prbaron / pbckcode

A CKEditor plugin to easily add code into your article
Apache License 2.0
44 stars 26 forks source link

Not showing up with galetahub/ckeditor #29

Closed osxi closed 10 years ago

osxi commented 10 years ago

I dropped the pbckcode/ directory into /app/assets/javascripts/ckeditor/plugins/ and have the following /app/assets/javascripts/ckeditor/config.js:

CKEDITOR.editorConfig = function( config )
{
config.extraPlugins = 'pbckcode,eqneditor';
};

I did the same thing for eqneditor as a control variable and it works fine (toolbar shows up automatically).

Any ideas?

osxi commented 10 years ago

The following config.js resolved my issue:

CKEDITOR.editorConfig = function( config ) { 
  config.extraPlugins = 'pbckcode,eqneditor';

  // Toolbar groups configuration.
  config.toolbarGroups = [ 
    { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
    { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
    { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
    { name: 'forms' },
    '/',
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
    { name: 'links' },
    { name: 'insert' },
    '/',
    { name: 'styles' },
    { name: 'colors' },
    { name: 'tools' },
    { name: 'others' },
    { name: 'about' },
    { name: 'pbckcode' }
  ];  
};

Used the toolbarGroups configuration from http://ckeditor.com/latest/samples/plugins/toolbar/toolbar.html and added the 'pbckcode' group was the fix.