Can I have a custom toolbar and custom external plugin at the same time using the CDN version of CKEditor? -


let start no expert working ckeditor think have done right , should work there doing wrong. 2 days trying figure out , think have tweaked more once , cannot work.

i loading https://cdn.ckeditor.com/4.6.2/full-all/ckeditor.js , loading external plugin wrote. plugin loading great , icon showed in toolbar , context menu @ appropriate times , clicking on them made right things happen. defined custom toolbar , got way wanted it; defined in local config file pointed customconfig:… in ckeditor.replace() setup call. right world!

then tried them both @ same time – toolbar icon/button not added custom toolbar setup. plugin still loading , working , can plugin through context menu , supposed think there , still working; cannot button/icon show in toolbar. have tried setting toolbar in config file array of arrays , array of objects group names – button not show up. have tried defining toolbar in ckeditor.replace() object both array of arrays , array of objects , custom toolbars show toolbar button not show up. have tried defining button in custom toolbar created , using editor.ui.addbutton method. no button in custom toolbar!

if comment out customconfig: line button shows in document group of default toolbar, think adding correctly @ right time right api , pointing @ right png file. however, if uncomment customconfig , make no other changes , hit ctrl+f5 multiple times flush cache button not show no matter try put (document, insert, button group add via api, etc).

i sure custom config getting processed , used because change toolbar standard built-in 1 have defined.

using default toolbar setup can add toolbarbuttongroup , put button in not work either when try use custom toolbar setup (i think read not allowed except built in toolbar in docs).

so questions are

  1. is possible have custom toolbar definition , external plugin , have custom toolbar button while using cdn version of ckeditor?
  2. will have build , host own version of ckeditor plugin not external plugin?
  3. is there else doing wrong?

here custom toolbar setup created (this not end game 1 created prove myself create custom toolbar):

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' ] } ]; 

here custom toolbar setup created icon/button in (it xrr first item in document group:

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' ] } ]; 

here how add button toolbar – works built in toolbar not custom definition above:

editor.ui.addbutton( 'xrr', {   label: 'create rr placeholder', // lang.toolbar,                 command: 'xrr',                 toolbar: 'document',                 icon: 'xrr'                 }             ); 

thanks can provide!


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -