[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

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

   1  // $Id: fckeditor.config.js,v 1.5.2.5.2.15 2010/02/25 08:30:35 jorrit 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  
   8  /*
   9   Define as many toolbars as you need, you can change toolbar names
  10   DrupalBasic will be forced on some smaller textareas (if enabled)
  11   if you change the name of DrupalBasic, you have to update
  12   FCKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME in fckeditor.module
  13   */
  14  
  15  //uncomment these three lines to enable teaser break and page break plugins
  16  //remember to add 'DrupalBreak' and 'DrupalPageBreak' buttons to the toolbar
  17  FCKConfig.Plugins.Add( 'drupalbreak', 'en,pl,ru' ) ;
  18  FCKConfig.Plugins.Add( 'imgassist' ) ;
  19  //To enable plugins below you should install additional Drupal modules.
  20  //Please refer to the README.txt for more instructions.
  21  //FCKConfig.Plugins.Add( 'drupalpagebreak', 'en,pl,ru' ) ;
  22  //FCKConfig.Plugins.Add( 'linktonode', 'en,pl' ) ;
  23  //FCKConfig.Plugins.Add( 'linktomenu', 'en,pl' ) ;
  24  /*
  25   This toolbar is dedicated to users with "Full HTML" access
  26   some of commands used here (like 'FontName') use inline styles,
  27   which unfortunately are stripped by "Filtered HTML" filter
  28   */
  29  FCKConfig.ToolbarSets['DrupalFull'] = [
  30  ['Source'],
  31  ['Cut','Copy','Paste','PasteText','PasteWord'],
  32  ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
  33  ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
  34  ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
  35  ['JustifyLeft','JustifyCenter','JustifyRight'],
  36  /*
  37   * EXPERIMENTAL
  38   * Uncomment the line below to enable linktonode and linktomenu buttons
  39   * ATTENTION: Link to Content module must be installed first!
  40   * Remember to load appropriate plugins with FCKConfig.Plugins.Add command a couple of lines above
  41   */
  42  //['Link','Unlink','LinkToNode','LinkToMenu','Anchor'],
  43  ['Link','Unlink','Anchor'],
  44  ['Image','Flash','Table','Rule','Smiley','SpecialChar','DrupalBreak'],
  45  //uncomment this line to enable the page break button
  46  //remember to load appropriate plugin with FCKConfig.Plugins.Add
  47  //['Image','Flash','Table','Rule','SpecialChar','DrupalBreak','DrupalPageBreak'],
  48  '/',
  49  ['FontFormat','FontName','FontSize'],
  50  ['TextColor','BGColor','ShowBlocks']
  51  ] ;
  52  
  53  FCKConfig.ToolbarSets['DrupalBasic'] = [
  54  ['FontFormat','-','Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','Image']
  55  ] ;
  56  
  57  //This toolbar should work fine with "Filtered HTML" filter
  58  FCKConfig.ToolbarSets['DrupalFiltered'] = [
  59  ['Source'],
  60  ['Cut','Copy','Paste','PasteText','PasteWord'],
  61  ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
  62  /*
  63   * EXPERIMENTAL
  64   * Uncomment the line below to enable linktonode and linktomenu buttons
  65   * ATTENTION: Link to Content module must be installed first!
  66   * Remember to load appropriate plugins with FCKConfig.Plugins.Add command a couple of lines above
  67   */
  68  //['Link','Unlink','LinkToNode','LinkToMenu','Anchor'],
  69  ['Link','Unlink','Anchor'],
  70  ['Image','Flash','Table','Rule','Smiley','SpecialChar'],
  71  '/',
  72  ['FontFormat'],
  73  ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
  74  ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
  75  //uncomment this line to enable the page break button
  76  //remember to load appropriate plugin with FCKConfig.Plugins.Add
  77  //['JustifyLeft','JustifyCenter','JustifyRight','DrupalBreak','DrupalPageBreak','ShowBlocks']
  78  ['JustifyLeft','JustifyCenter','JustifyRight','DrupalBreak','ShowBlocks']
  79  ] ;
  80  
  81  //helper function to add button at the end of the toolbar
  82  function addToolbarElement(element, toolbar, pos){
  83    var ts = FCKConfig.ToolbarSets ;
  84    if (ts[toolbar]) {
  85      var len=ts[toolbar].length;
  86      if (pos>=len) pos=len-1;
  87      if (ts[toolbar][(len -pos -1)] == '/') pos++;
  88      if (pos>=len) pos=len-1;
  89      if (!ts[toolbar][(len -pos -1)]) pos++;
  90      FCKConfig.ToolbarSets[toolbar][(len -pos -1)].push(element);
  91    }
  92  }
  93  
  94  // Protect PHP code tags (<?...?>) so FCKeditor will not break them when
  95  // switching from Source to WYSIWYG.
  96  // Uncommenting this line doesn't mean the user will not be able to type PHP
  97  // code in the source. This kind of prevention must be done in the server side
  98  // (as does Drupal), so just leave this line as is.
  99  FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
 100  
 101  var _FileBrowserLanguage = 'php' ;
 102  var _QuickUploadLanguage = 'php' ;
 103  
 104  // This overrides the IndentLength/IndentUnit settings.
 105  FCKConfig.IndentClasses = ['rteindent1','rteindent2','rteindent3','rteindent4'] ;
 106  
 107  // [ Left, Center, Right, Justified ]
 108  FCKConfig.JustifyClasses = ['rteleft','rtecenter','rteright','rtejustify'] ;
 109  //Set to 'encode' if you want to obfuscate emails with javascript
 110  FCKConfig.EMailProtection = 'none' ;
 111  // #330286 remove "Red Title" from Styles list.
 112  FCKConfig.CustomStyles = {};


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