Tipy:
Umožňuje nahradit textová pole CKEditorem (WYSIWYG editor pro vkládání textového, grafického a multimediálního obsahu), který je novou generací FCKEditoru.
CKEditor je funkční v prohlížečích Internet Explorer 6.0+, FireFox 3.0+, Safari 4.0+, Opera 9.5+, Google Chrome, Camino 1.0+ se zapnutou podporou JavaScriptu.
Některé výhody:
Zjištěné nedostatky verze CKEditor 6.x-1.0 oproti modulu FCKeditor 6.x-2.1:
Univerzálnější řešení nabízí modul WYSIWYG.
Při instalaci CKEditor provádí kontrolu existence modulu FCKeditor. Pokud je modul FCKEditor pouze vypnut a není odinstalován, převezme CKEditor všechna nastavení, profily atd.
Po instalaci CKEditoru je možné modul FCKeditor odinstalovat. Pokud jsou povoleny oba moduly současně, dojde k chybě, protože se oba pokusí připojit ke stejnému textovému poli.
drush dl ckeditor drush en -y ckeditor drush ckeditor-download drush cc all

[ ['Format', 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', 'Outdent', 'Indent', '-', 'Link', 'Unlink'] ]

[ ['Source'], ['Cut', 'Copy', 'PasteText'], ['Undo', 'Redo', '-', 'RemoveFormat'], ['Image', 'Table', 'HorizontalRule', 'Smiley'], ['Link', 'Unlink', 'Anchor', 'Linkit', 'LinkToNode', 'LinkToMenu'], ['Maximize'], '/', ['Format'], ['Bold', 'Italic', 'Strike', '-', 'Subscript', 'Superscript'], ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'], ['JustifyLeft', 'JustifyCenter', 'JustifyRight'], ['DrupalBreak', 'DrupalPageBreak', 'NodeEmbed'] ]
'Templates', 'SpellChecker', 'Replace', 'SelectAll' 'IMCE', 'Flash', 'MediaEmbed', 'CpecialChar' 'ShowBlocks', 'About', 'Styles', 'BGColor', 'JustifyBlock' 'Paste','PasteFromWord', 'Scayt', 'Find', 'BidiRtl','BidiLtr',
config.bodyClass = 'wysiwyg'; config.basicEntities = false; //Disable auto include basic HTML entities: nbsp, gt, lt, amp (IE8 issues) config.allowedContent = true; //enable CLASS, SPAN, IFRAME etc. in content
config.justifyClasses = [ 'left', 'center', 'right', 'justify' ];
config.templates_files = [ //'/sites/all/libraries/ckeditor/plugins/templates/templates/default.js', '/sites/all/themes/wysiwyg/ckeditor.templates.js' ];
config.smiley_path = + 'plugins/smiley/images/';
// config.smiley_path = '/sites/default/files/pictures/smileys/';
//config.smiley_path = '/system/files/pictures/smileys/';
config.smiley_descriptions = [
':)', ':(', ';)', ':D', ':/', ':P',
':$', ':o', ':|', ':@', '(A)', '(H)',
'(6)', ';(', '(I)', '(N)', '(Y)', '(L)',
'(U)', ':kiss', '(E)' ];
config.smiley_images = [
'regular_smile.gif', 'sad_smile.gif', 'wink_smile.gif', 'teeth_smile.gif', 'confused_smile.gif', 'tounge_smile.gif',
'embaressed_smile.gif', 'omg_smile.gif', 'whatchutalkingabout_smile.gif', 'angry_smile.gif', 'angel_smile.gif', 'shades_smile.gif',
'devil_smile.gif', 'cry_smile.gif', 'lightbulb.gif', 'thumbs_down.gif', 'thumbs_up.gif', 'heart.gif',
'broken_heart.gif', 'kiss.gif', 'envelope.gif'];

/* My Styles */
{name: 'Image Alone', element: 'img', attributes: {'class': 'alone'}},
{name: 'Float Left', element: 'div', attributes: {'class': 'f-left'}},
{name: 'Float Right', element: 'div', attributes: {'class': 'f-right'}},
{name: 'Clear (p)', element: 'p', attributes: {'class': 'clear'}},
/* CKEditor */
.cke_panel_listItem a {
color: #000;
background-color: #fff;
text-decoration: none;
font-size: 80%;
}
.cke_panel_listItem.cke_selected a {
}
/* config.bodyId = 'wysiwyg' in file ckeditor.config.js */
.wysiwyg {
color: #000;
background-color: #fff;
background-image: none;
}
.wysiwyg .left {text-align: left;}
.wysiwyg .center {text-align: center;}
.wysiwyg .right {text-align: right;}
.wysiwyg .justify {text-align: justify;}sites/all/libraries/ckeditor/plugins/
table/dialogs/table.js je možné zakomentovat (odstranit) zvýrazněné nastavení:
Pokud používáte modul CKEditor (FCKeditor) je doporučeno pro lepší kontrolu nad konci řádků vypnout u všech vstupních formátů, kde se bude CKEditor používat filtr Převést odřádkování do HTML (tj. <br> a <p>). ![]()
Další moduly:
Konfigurace:
config.removeButtons = 'Underline,Strike,PasteText,PasteFromWord,Image,RemoveFormat';
config.entities_latin = false;
config.forcePasteAsPlainText = true;
config.contentsCss = ['global.css', 'editor.css'];
config.contentsCss = [ 'framework/bootstrap/css/bootstrap.min.css', 'font/akronim-regular/stylesheet.css', 'font/poiretone-regular/stylesheet.css', //'font/font-awesome/css/font-awesome.min.css', 'design/global.css' ];
config.format_tags = 'p;h1;h2;h3;pre;address;div';
config.removeDialogTabs = 'image:advanced;link:advanced';
config.stylesSet = [
{ name : 'Psací stroj', element : 'tt' }, // Typewriter
{ name : 'Počítačový kód', element : 'code' }, // Computer Code
{ name : 'Klávesová zkratka', element : 'kbd' }, // Keyboard Phrase
// { name : 'Jednoduchý text', element : 'samp' }, // Simple text
// { name : 'Proměnná', element : 'var' }, // Variable
{ name : 'Odstraněný text', element : 'del' }, // Deleted text
{ name : 'Vložený text', element : 'ins' }, // Inserted text
// { name : 'Citace (Cited work)', element : 'cite' },
{ name : 'Řádková citace', element : 'q' }
];Rozšíření:
config.extraPlugins = 'justify'; config.justifyClasses = [ 'text-left', 'text-center', 'text-right', 'text-justify' ];
config.extraPlugins = 'textselection';
//config.extraPlugins = 'nbsp';
config.extraPlugins = 'wordcount,notification';
config.wordcount = {
showParagraphs: false,
showWordCount: true,
showCharCount: true,
countSpacesAsChars: false,
};config.extraAllowedContent = 'dl dt dd span'; config.allowedContent = true
config.extraPlugins = 'codemirror';
CKEDITOR.on('instanceReady', function(ev) {
var blockTags = ['div','h1','h2','h3','h4','h5','h6','p','pre','blockquote','ul','ol','table','thead','tbody','tfoot','td','th'];
var rules = {
indent : true,
breakBeforeOpen : true,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : false
};
for (var i=0; i<blockTags.length; i++) {
ev.editor.dataProcessor.writer.setRules(blockTags[i], rules);
}
});
CKEDITOR.on('instanceReady', function(ev) {
var blockTags = ['li'];
var rules = {
indent : true,
breakBeforeOpen : true,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : true
};
for (var i=0; i<blockTags.length; i++) {
ev.editor.dataProcessor.writer.setRules(blockTags[i], rules);
}
});//config.extraPlugins = 'youtube'; // vypina codemirror //config.youtube_autoplay = true;
//config.extraPlugins = 'widget'; //config.extraPlugins = 'lineutils'; //config.extraPlugins = 'oembed';
Tip: