| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 // $Id: ckeditor.config.js,v 1.2.2.10 2010/09/27 12:37:20 dczepierga Exp $ 2 3 /* 4 WARNING: clear browser's cache after you modify this file. 5 If you don't do this, you may notice that browser is ignoring all your changes. 6 */ 7 CKEDITOR.editorConfig = function(config) { 8 config.indentClasses = [ 'rteindent1', 'rteindent2', 'rteindent3', 'rteindent4' ]; 9 10 // [ Left, Center, Right, Justified ] 11 config.justifyClasses = [ 'rteleft', 'rtecenter', 'rteright', 'rtejustify' ]; 12 13 // The minimum editor width, in pixels, when resizing it with the resize handle. 14 config.resize_minWidth = 450; 15 16 // Protect PHP code tags (<?...?>) so CKEditor will not break them when 17 // switching from Source to WYSIWYG. 18 // Uncommenting this line doesn't mean the user will not be able to type PHP 19 // code in the source. This kind of prevention must be done in the server 20 // side 21 // (as does Drupal), so just leave this line as is. 22 config.protectedSource.push(/<\?[\s\S]*?\?>/g); // PHP Code 23 config.extraPlugins = ''; 24 if (Drupal.ckeditorCompareVersion('3.1')) { 25 config.extraPlugins += (config.extraPlugins ? ',drupalbreaks' : 'drupalbreaks' ); 26 } 27 28 if (Drupal.settings.ckeditor.linktocontent_node) { 29 config.extraPlugins += (config.extraPlugins ? ',linktonode' : 'linktonode' ); 30 } 31 if (Drupal.settings.ckeditor.linktocontent_menu) { 32 config.extraPlugins += (config.extraPlugins ? ',linktomenu' : 'linktomenu' ); 33 } 34 35 // Define as many toolbars as you need, you can change toolbar names and remove or add buttons. 36 // List of all buttons is here: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.toolbar_Full 37 38 // This toolbar should work fine with "Filtered HTML" filter 39 config.toolbar_DrupalFiltered = [ 40 ['Source'], 41 ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'], 42 ['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'], 43 ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'], 44 ['Maximize', 'ShowBlocks'], 45 '/', 46 ['Format'], 47 ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], 48 ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], 49 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiRtl','BidiLtr'], 50 ['Link','Unlink','Anchor','LinkToNode', 'LinkToMenu'], 51 ['DrupalBreak', 'DrupalPageBreak'] 52 ]; 53 54 /* 55 * DrupalBasic will be forced on some smaller textareas (if enabled) 56 * if you change the name of DrupalBasic, you have to update 57 * CKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME in ckeditor.module 58 */ 59 config.toolbar_DrupalBasic = [ [ 'Format', '-', 'Bold', 'Italic', '-', 'NumberedList','BulletedList', '-', 'Link', 'Unlink', 'Image' ] ]; 60 61 /* 62 * This toolbar is dedicated to users with "Full HTML" access some of commands 63 * used here (like 'FontName') use inline styles, which unfortunately are 64 * stripped by "Filtered HTML" filter 65 */ 66 config.toolbar_DrupalFull = [ 67 ['Source'], 68 ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'], 69 ['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'], 70 ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'], 71 '/', 72 ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], 73 ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], 74 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiRtl','BidiLtr'], 75 ['Link','Unlink','Anchor','LinkToNode', 'LinkToMenu'], 76 '/', 77 ['Format','Font','FontSize'], 78 ['TextColor','BGColor'], 79 ['Maximize', 'ShowBlocks'], 80 ['DrupalBreak', 'DrupalPageBreak'] 81 ]; 82 83 /* 84 * Append here extra CSS rules that should be applied into the editing area. 85 * Example: 86 * config.extraCss = 'body {color:#FF0000;}'; 87 */ 88 config.extraCss = ''; 89 /** 90 * Sample extraCss code for the "marinelli" theme. 91 */ 92 if (Drupal.settings.ckeditor.theme == "marinelli") { 93 config.extraCss += "body{background:#FFF;text-align:left;font-size:0.8em;}"; 94 config.extraCss += "#primary ol, #primary ul{margin:10px 0 10px 25px;}"; 95 } 96 if (Drupal.settings.ckeditor.theme == "newsflash") { 97 config.extraCss = "body{min-width:400px}"; 98 } 99 100 /** 101 * CKEditor's editing area body ID & class. 102 * See http://drupal.ckeditor.com/tricks 103 * This setting can be used if CKEditor does not work well with your theme by default. 104 */ 105 config.bodyClass = ''; 106 config.bodyId = ''; 107 /** 108 * Sample bodyClass and BodyId for the "marinelli" theme. 109 */ 110 if (Drupal.settings.ckeditor.theme == "marinelli") { 111 config.bodyClass = 'singlepage'; 112 config.bodyId = 'primary'; 113 } 114 115 if (Drupal.ckeditorCompareVersion('3.1')) { 116 CKEDITOR.plugins.addExternal('drupalbreaks', Drupal.settings.ckeditor.module_path + '/plugins/drupalbreaks/'); 117 } 118 if (Drupal.settings.ckeditor.linktocontent_menu) { 119 CKEDITOR.plugins.addExternal('linktomenu', Drupal.settings.ckeditor.module_path + '/plugins/linktomenu/'); 120 Drupal.settings.ckeditor.linktomenu_basepath = Drupal.settings.basePath; 121 } 122 if (Drupal.settings.ckeditor.linktocontent_node) { 123 CKEDITOR.plugins.addExternal('linktonode', Drupal.settings.ckeditor.module_path + '/plugins/linktonode/'); 124 Drupal.settings.ckeditor.linktonode_basepath = Drupal.settings.basePath; 125 } 126 127 // 'MediaEmbed' plugin. To enable it, uncomment lines below and add 'MediaEmbed' button to selected toolbars. 128 //config.extraPlugins += (config.extraPlugins ? ',mediaembed' : 'mediaembed' ); 129 //CKEDITOR.plugins.addExternal('mediaembed', Drupal.settings.ckeditor.module_path + '/plugins/mediaembed/'); 130 131 // 'IMCE' plugin. If IMCE module is enabled, you may uncomment lines below and add an 'IMCE' button to selected toolbar. 132 //config.extraPlugins += (config.extraPlugins ? ',imce' : 'imce' ); 133 //CKEDITOR.plugins.addExternal('imce', Drupal.settings.ckeditor.module_path + '/plugins/imce/'); 134 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |