CKEDITOR.editorConfig = function( config ) {
config.toolbarGroups = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection' ] },//, 'spellchecker'
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'align', 'bidi' ] }, //, 'blocks', 'bidi'
{ name: 'links' },
{ name: 'insert' },
'/',
{ name: 'styles' },
{ name: 'colors' },
{ name: 'tools' }
];
config.removeButtons = 'Image,Flash,HorizontalRule,Smiley,Iframe,PageBreak,Anchor,ShowBlocks,Language,Styles'; //
config.defaultlanguage = 'en';
// Set the most common block elements.
//config.format_tags = 'p;h1;h2;h3;pre';
// config.basicEntities = false;
// config.entities = false;
config.basicEntities = true;
config.entities = true;
config.entities_greek = false;
config.entities_latin = false;
config.htmlEncodeOutput = false;
config.entities_processNumerical = false;
config.removePlugins = 'elementspath';
config.resize_enabled = false;
config.disallowedContent = 'img script';
config.allowedContent = true;
config.extraAllowedContent = '*(*);*{*}';
config.extraAllowedContent = 'span(style);';
};
Я использую ckeditor4 на странице aspx. Используя textarea, я настраиваю ckeditor с функцией замены. Пока я отправляю, атрибуты стиля не сохраняются. Я также добавил плагин шрифтов