Forum

Thread tagged as: Question, Problem, CKEditor

Trying to get full ckeditor toolbar

Ive updated a website from perch 2 to perch 3 and updated all my plugins including ckeditor. However i need to use the full toolbar configuration, mainly the font-size.

Ive tried changing the build-config from 'standard' to 'full' but that doesn't work and also taking the config.js from a normal full copy of ckeditor but that doesn't change anything.

I even tried using the toolbarconfigurator thats in the samples folder and setting that to full toolbar and that didnt work.

Is there anyway to edit ckeditor for perch so i can get more of the tools?

Cheers

ewe agency

ewe agency 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using the version of CKEditor from our addons site?

Yes i am. I downloaded a fresh version when i updated to perch 3

Drew McLellan

Drew McLellan 2638 points
Perch Support

You should be able to customise your config in the file

/perch/addons/plugins/editors/ckeditor/ckeditor-4/config.js

Yeah ive tried that but i dont think the perch version of ckeditor has all the tools/plugins installed for the full version of ckeditor. Ive tried adding the plugins from a full download from the ckeditor site but i think they both call in the functions differently as the ckeditor.js files differ greatly.

Also if you go to samples/toolconfigurator in the perch addon bit all the tools are already selected but there is no more for font-size/family

Actually sorry the ckeditor.js files dont differ much i was looking at an old copy of the file, but it still doesnt add the extra tools/plugins

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, it's the Standard version. You'd need to add those other plugins if you wanted them.

Yeah ive added all the plugins from a download of full ckeditor version from their website and updated the config.js to this:

        config.toolbar = [
            { name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
            { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
            { name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
            { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
            '/',
            { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'CopyFormatting', 'RemoveFormat' ] },
            { 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' ] },
            { name: 'colors', items: [ 'TextColor', 'BGColor' ] },
            { name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
            { name: 'about', items: [ 'About' ] }
        ];

This just changes the layout of the current tools and doesnt add/show any of the new ones that have been added

Drew McLellan

Drew McLellan 2638 points
Perch Support

Make sure you have caching disabled. It definitely works here.

Hmm ive been using incognito mode to check it everytime and also tried setting the perch_production_mode to perch_development and it still doesnt show the tools.

This is what im seeing:

Screenshot

Drew McLellan

Drew McLellan 2638 points
Perch Support

That looks ok to me - is that supposed to look wrong somehow?

There should be more tools. It should look like this

screenshot 2

As ive added the plugins and toolbar.config for the full ckeditor

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. I'm not sure how I can help you debug that.

Just thinking, would it be possible to set up ckeditor as a custom editor and use the full version you can download from their website, or would this conflict with perch?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, it's already an add-on, so that's effectively what you have.

Okay i will keep at it or use another editor. Cheers!

Drew McLellan

Drew McLellan 2638 points
Perch Support

Or just download the version of CKEditor you want. If you don't like the one I've packaged for you, then you can package one you do want.

Thats what ive tried but the editor just doesnt load at all then. I replaced the contents of /ckeditor-4/ with a download from the ckeditor site and it doesnt work.

Theres no perch debug errors but this error in the console

"jQuery.Deferred exception: Cannot set property 'filebrowserUploadUrl' of undefined TypeError: Cannot set property 'filebrowserUploadUrl' of undefined"

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm afraid is past the remit of our free support to debug changes you want to make to one of our add-ons, or to add-ons of your own.