CKEditor - change availabe options

648 Views Asked by At

I am using CKEditor in my application, which I am developing using Outsystems. I need to change the current view provided by the CKEditor. (It has GUI options to save the data, make it italic, bold etc). I need to remove these options or either disable them.

Any hints ?

Thanks !

1

There are 1 best solutions below

0
On BEST ANSWER

There's pretty good advice in the developers guide, but this is what I use:

In your config.js

config.toolbar = 'Mine';
config.toolbar_Mine =
[
    { name: 'document', items: ['Source', '-', 'Save', 'NewPage', 'DocProps', '-', 'Templates'] },
    { name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },
    { name: 'editing', items: ['Find', 'Replace', '-', 'SelectAll', '-', 'SpellChecker', 'Scayt'] },
    '/',
    { name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'] },
    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'CreateDiv',
    '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']
    },
    { name: 'links', items: ['Link', 'Unlink', 'Doxtest'] },
    { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'] },
    '/',
    { name: 'styles', items: ['Styles', 'Format', 'FontSize'] },
    { name: 'colors', items: ['TextColor', 'BGColor'] },
    { name: 'tools', items: ['Maximize', 'ShowBlocks'] },
    { name: 'ponify', items: ['InsertMagicalPony'] }
];

Then just add/remove whatever you need. Note the { name: 'ponify', items: ['InsertMagicalPony'] },which you for example would probably not have.