title: Can I have a custom toolbar and custom external plugin at the same time using the CDN version of CKEditor?
body: <p>Let start with I am no expert working with CKEditor but I think I have done this right and it should work but there certainly could be something I am doing wrong.  Two days trying to figure it out and I think I have tweaked everything more than once and just cannot get it all to work.</p>
  
  <p>I am loading <a href="https://cdn.ckeditor.com/4.6.2/full-all/ckeditor.js" rel="nofollow noreferrer">https://cdn.ckeditor.com/4.6.2/full-all/ckeditor.js</a> and loading an external plugin that I wrote.  My plugin is loading great and my icon showed up in the toolbar and context menu at appropriate times and clicking on them made the right things happen.  I defined a custom toolbar and I got that just the way I wanted it; defined in a local config file pointed to by customConfig:… in the CKEDITOR.replace() setup call.  All was right with the world! </p>
  
  <p>Then I tried to do them both at the same time – but my toolbar icon/button does not get added to my custom toolbar setup.  My plugin is still loading and working and I can get my plugin through the context menu and it does what it is supposed to do so I think it is there and still working; but I cannot get the button/icon to show up in the toolbar.  I have also tried setting the toolbar in the config file as an array of arrays and as an array of objects with group names – my button does not show up.  I have tried defining the toolbar in the CKEDITOR.replace() object as both an array of arrays and as an array of objects and the custom toolbars show up but my toolbar button does not show up.  I have tried defining my button in the custom toolbar that I created and by using the editor.ui.addButton method.  No button in my custom toolbar!</p>
  
  <p>If I comment out the customConfig: line then my button shows up in the document group of the default toolbar, so I think that I am adding it correctly at the right time with the right API and pointing at the right png file.  However, if I uncomment the customConfig and make no other changes and hit Ctrl+F5 multiple times to flush the cache then the button does not show up no matter where I try to put it (document, insert, button group I add via API, etc).  </p>
  
  <p>I am fairly sure that my custom config is getting processed and used because it does change the toolbar from the standard built-in one to what I have defined.</p>
  
  <p>Using the default toolbar setup I can add a toolbarButtonGroup and put my button in that but that does not work either when I try to use a custom toolbar setup (I think that I read this was not allowed except for the built in toolbar in the docs).</p>
  
  <p>So my questions are</p>
  
  <ol>
  <li>Is it possible to have a custom toolbar definition AND an external plugin AND have a custom toolbar button all while using the CDN version of CKEditor?  </li>
  <li>Will I have to build and host my own version of CKEditor so that my plugin is not an external plugin?</li>
  <li>Is there something else I am doing wrong?</li>
  </ol>
  
  <p>Here is the custom toolbar setup I created (this is not the end game but one that I created to prove to myself I could create a custom toolbar):</p>
  
  <pre><code>config.toolbar = [
  { name: 'document',     items: [ 'Save', 'Preview', 'Print' ] },
  { name: 'basicstyles',  items: [ 'Bold', 'Italic', 'Underline', '-', 'CopyFormatting', 'RemoveFormat' ] },
  { name: 'clipboard',    items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
  { name: 'colors',   items: [ 'TextColor', 'BGColor' ] },
  { name: 'editing',  items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
  '/',
  { name: 'forms',    items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
  { name: 'paragraph',    items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] },
  { name: 'links',        items: [ 'Link', 'Unlink', 'Anchor' ] },
  { name: 'insert',   items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] },
  '/',
  { name: 'styles',   items: [ 'Styles', 'Format', 'Font', 'FontSize', 'Strike', 'Subscript', 'Superscript' ] },
  { name: 'tools',        items: [ 'Maximize', 'ShowBlocks', 'Source' ] },
  { name: 'about',    items: [ 'About' ] }
  ];
  </code></pre>
  
  <p>Here is the custom toolbar setup I created with my icon/button in it (it is the xrr first item in the document group:</p>
  
  <pre><code>config.toolbar = [
  { name: 'document',     items: [ ‘xrr’, 'Save', 'Preview', 'Print' ] },
  { name: 'basicstyles',  items: [ 'Bold', 'Italic', 'Underline', '-', 'CopyFormatting', 'RemoveFormat' ] },
  { name: 'clipboard',    items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
  { name: 'colors',   items: [ 'TextColor', 'BGColor' ] },
  { name: 'editing',  items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
  '/',
  { name: 'forms',    items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
  { name: 'paragraph',    items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] },
  { name: 'links',        items: [ 'Link', 'Unlink', 'Anchor' ] },
  { name: 'insert',   items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] },
  '/',
  { name: 'styles',   items: [ 'Styles', 'Format', 'Font', 'FontSize', 'Strike', 'Subscript', 'Superscript' ] },
  { name: 'tools',        items: [ 'Maximize', 'ShowBlocks', 'Source' ] },
  { name: 'about',    items: [ 'About' ] }
  ];
  </code></pre>
  
  <p>Here is how I add the button to the toolbar – this works for the built in toolbar but not with the custom definition above:</p>
  
  <pre><code>editor.ui.addButton( 'xrr', {   label: 'Create RR Placeholder', // lang.toolbar,
                  command: 'xrr',
                  toolbar: 'document',
                  icon: 'xrr'
                  }
              );
  </code></pre>
  
  <p>Thanks so much for any help anyone can provide!</p>