CKEditor - 更改可用选项

时间:2012-10-15 09:02:41

标签: ckeditor outsystems

我在我的应用程序中使用CKEditor,我正在使用Outsystems进行开发。我需要更改CKEditor提供的当前视图。 (它有GUI选项来保存数据,使其变为斜体,粗体等)。我需要删除这些选项或禁用它们。

任何提示?

谢谢!

1 个答案:

答案 0 :(得分:1)

the developers guide中有很好的建议,但这就是我使用的:

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

然后添加/删除您需要的任何内容。请注意{ name: 'ponify', items: ['InsertMagicalPony'] },例如您可能没有。