190 lines
5.4 KiB
JavaScript
190 lines
5.4 KiB
JavaScript
CKEDITOR.editorConfig = function(config) {
|
|
CKEDITOR.tools.extend(config,
|
|
{
|
|
toolbar: 'editor',
|
|
'entities_additional': '',
|
|
'autoGrow_maxHeight': 500,
|
|
'autoGrow_onStartup': false,
|
|
'autoGrow_minHeight': 150,
|
|
'autoGrow_bottomSpace': 10,
|
|
'entities': false,
|
|
'language': 'cs',
|
|
'startupOutlineBlocks': true,
|
|
'extraPlugins': 'mediaembed,',
|
|
'allowedContent': {
|
|
$1: {
|
|
// https://ckeditor.com/docs/ckeditor4/latest/guide/dev_disallowed_content.html#how-to-allow-everything-except
|
|
elements: CKEDITOR.dtd,
|
|
attributes: true,
|
|
styles: true,
|
|
classes: true,
|
|
},
|
|
},
|
|
'disallowedContent': 'script; style; b; font; input;',
|
|
'basicEntities': false,
|
|
'height': 150,
|
|
'entities_processNumerical': false,
|
|
'entities_greek': false,
|
|
'toolbarCanCollapse': true,
|
|
'entities_latin': false,
|
|
templates_files: ['launch.php?s=products.templates.php'],
|
|
templates_replaceContent: false,
|
|
disableNativeSpellChecker: false,
|
|
browserContextMenuOnCtrl: true,
|
|
contentsCss: [CKEDITOR.getUrl('contents.css'), 'static/css/ckeditor.css'],
|
|
format_tags: 'p;h1;h2;h3;h4;h5;div',
|
|
toolbar_editor: [
|
|
['Copy', 'Paste', 'PasteText', 'PasteFromWord'],
|
|
['MediaEmbed'],
|
|
['Undo', 'Redo', '-', 'Find', '-', 'SelectAll', 'RemoveFormat'],
|
|
['Format', 'FontSize'],
|
|
['TextColor', 'BGColor'], '/', ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'],
|
|
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'],
|
|
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
|
['Link', 'Unlink', 'Anchor'],
|
|
['Image', 'Table', 'SpecialChar'],
|
|
['HorizontalRule'],
|
|
['Maximize', 'ShowBlocks', 'Source'],
|
|
],
|
|
toolbar_BasicHTML: [
|
|
['Undo', 'Redo'],
|
|
['Format', 'TextColor'],
|
|
['PasteText', 'PasteFromWord'],
|
|
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
|
//'/',
|
|
[
|
|
'Bold',
|
|
'Italic',
|
|
'Underline',
|
|
'-',
|
|
'NumberedList',
|
|
'BulletedList',
|
|
'-',
|
|
'Link',
|
|
'Image',
|
|
'Table',
|
|
'-',
|
|
'RemoveFormat',
|
|
'Templates',
|
|
'Source',
|
|
'ShowBlocks'],
|
|
],
|
|
// default:
|
|
toolbar_BasicTable: [
|
|
[
|
|
'Undo',
|
|
'Redo',
|
|
'-',
|
|
'PasteFromWord',
|
|
'-',
|
|
'Bold',
|
|
'Italic',
|
|
'-',
|
|
'NumberedList',
|
|
'BulletedList',
|
|
'-',
|
|
'-',
|
|
'JustifyLeft',
|
|
'JustifyCenter',
|
|
'JustifyRight',
|
|
'JustifyBlock',
|
|
'-',
|
|
'TextColor',
|
|
'RemoveFormat',
|
|
'-',
|
|
'Link',
|
|
'Unlink',
|
|
'Image',
|
|
'-',
|
|
'Table',
|
|
'-',
|
|
'Format',
|
|
'-',
|
|
'Templates',
|
|
'MediaEmbed',
|
|
'Source',
|
|
'ShowBlocks'],
|
|
],
|
|
toolbar_ProductDescription: [
|
|
[
|
|
'Undo',
|
|
'Redo',
|
|
'-',
|
|
'PasteFromWord',
|
|
'-',
|
|
'JustifyLeft',
|
|
'JustifyCenter',
|
|
'JustifyRight',
|
|
'JustifyBlock',
|
|
'-',
|
|
'Bold',
|
|
'Italic',
|
|
'-',
|
|
'NumberedList',
|
|
'BulletedList',
|
|
'-',
|
|
'RemoveFormat',
|
|
'-',
|
|
'Link',
|
|
'Unlink',
|
|
'Image',
|
|
'-',
|
|
'Table',
|
|
'-',
|
|
'Format',
|
|
'-',
|
|
'Source',
|
|
'-',
|
|
'Templates',
|
|
'MediaEmbed',
|
|
'ShowBlocks'],
|
|
],
|
|
toolbar_BasicTextAndImage: [
|
|
[
|
|
'Undo',
|
|
'Redo',
|
|
'-',
|
|
'PasteFromWord',
|
|
'-',
|
|
'JustifyLeft',
|
|
'JustifyCenter',
|
|
'JustifyRight',
|
|
'Bold',
|
|
'Italic',
|
|
'Underline',
|
|
'FontSize',
|
|
'Font',
|
|
'Image'],
|
|
],
|
|
toolbar_email: [
|
|
[
|
|
'Undo',
|
|
'Redo',
|
|
'-',
|
|
'Bold',
|
|
'Italic',
|
|
'-',
|
|
'NumberedList',
|
|
'BulletedList',
|
|
'-',
|
|
'JustifyLeft',
|
|
'JustifyCenter',
|
|
'JustifyRight',
|
|
'-',
|
|
'RemoveFormat',
|
|
'-',
|
|
'Link',
|
|
'Unlink',
|
|
'Image',
|
|
'-',
|
|
'Table',
|
|
'-',
|
|
'Format',
|
|
'-',
|
|
'Source',
|
|
'ShowBlocks',
|
|
],
|
|
],
|
|
}, true);
|
|
};
|