[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/ckeditor/ -> ckeditor.config.js (source)

   1  /*
   2  Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
   3  For licensing, see LICENSE.html or http://ckeditor.com/license
   4  */
   5  
   6  /*
   7   WARNING: Clear the browser cache after you modify this file.
   8   If you do not do this, you may notice that the browser is ignoring all your changes.
   9   */
  10  CKEDITOR.editorConfig = function(config) {
  11    config.indentClasses = [ 'rteindent1', 'rteindent2', 'rteindent3', 'rteindent4' ];
  12  
  13    // [ Left, Center, Right, Justified ]
  14    config.justifyClasses = [ 'rteleft', 'rtecenter', 'rteright', 'rtejustify' ];
  15  
  16    // The minimum editor width, in pixels, when resizing it with the resize handle.
  17    config.resize_minWidth = 450;
  18  
  19    // Protect PHP code tags (<?...?>) so CKEditor will not break them when
  20    // switching from Source view to WYSIWYG.
  21    // Uncommenting this line doesn't mean the user will not be able to type PHP
  22    // code in the source. This kind of prevention must be done in the server
  23    // side
  24    // (as does Drupal), so just leave this line as is.
  25    config.protectedSource.push(/<\?[\s\S]*?\?>/g); // PHP Code
  26    config.protectedSource.push(/<code>[\s\S]*?<\/code>/gi); // Code tags
  27    config.extraPlugins = '';
  28  
  29    /*
  30     * Append here extra CSS rules that should be applied into the editing area.
  31     * Example:
  32     * config.extraCss = 'body {color:#FF0000;}';
  33     */
  34    config.extraCss = '';
  35    /**
  36     * Sample extraCss code for the "marinelli" theme.
  37     */
  38    var themeName = Drupal.settings.ckeditor.theme;
  39    if (typeof themeName == "object") {
  40      themeName = Drupal.settings.ckeditor.theme[0];
  41    }
  42    if (themeName == "marinelli") {
  43      config.extraCss += "body{background:#FFF;text-align:left;font-size:0.8em;}";
  44      config.extraCss += "#primary ol, #primary ul{margin:10px 0 10px 25px;}";
  45    }
  46    if (themeName == "newsflash") {
  47      config.extraCss = "body{min-width:400px}";
  48    }
  49  
  50    /**
  51     * CKEditor's editing area body ID & class.
  52     * See http://drupal.ckeditor.com/tricks
  53     * This setting can be used if CKEditor does not work well with your theme by default.
  54     */
  55    config.bodyClass = '';
  56    config.bodyId = '';
  57    /**
  58     * Sample bodyClass and BodyId for the "marinelli" theme.
  59     */
  60    if (themeName == "marinelli") {
  61      config.bodyClass = 'singlepage';
  62      config.bodyId = 'primary';
  63    }
  64  };
  65  
  66  /*
  67   * Sample toolbars
  68   */
  69  
  70  //Toolbar definition for basic buttons
  71  Drupal.settings.cke_toolbar_DrupalBasic = [ [ 'Format', 'Bold', 'Italic', '-', 'NumberedList','BulletedList', '-', 'Link', 'Unlink', 'Image' ] ];
  72  
  73  //Toolbar definition for Advanced buttons
  74  Drupal.settings.cke_toolbar_DrupalAdvanced = [
  75      ['Source'],
  76      ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],
  77      ['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
  78      ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],
  79      ['Maximize', 'ShowBlocks'],
  80      '/',
  81      ['Format'],
  82      ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
  83      ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
  84      ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiRtl','BidiLtr'],
  85      ['Link','Unlink','Anchor','Linkit','LinkToNode','LinkToMenu'],
  86      ['DrupalBreak', 'DrupalPageBreak']
  87  ];
  88  
  89  // Toolbar definiton for all buttons
  90  Drupal.settings.cke_toolbar_DrupalFull = [
  91      ['Source'],
  92      ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],
  93      ['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
  94      ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','Iframe'],
  95      '/',
  96      ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
  97      ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
  98      ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiRtl','BidiLtr'],
  99      ['Link','Unlink','Anchor','Linkit','LinkToNode', 'LinkToMenu'],
 100      '/',
 101      ['Format','Font','FontSize'],
 102      ['TextColor','BGColor'],
 103      ['Maximize', 'ShowBlocks'],
 104      ['DrupalBreak', 'DrupalPageBreak']
 105  ];


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7