Projet

Général

Profil

Paste
Télécharger (4,01 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / ckeditor / ckeditor.config.js @ be58a50c

1
/*
2
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
For licensing, see LICENSE.html or http://ckeditor.com/license
4
*/
5

    
6
/*
7
 WARNING: clear browser's cache after you modify this file.
8
 If you don't do this, you may notice that 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 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

    
27
  // [#1762328] Uncomment the line below to protect <code> tags in CKEditor (hide them in wysiwyg mode).
28
  // config.protectedSource.push(/<code>[\s\S]*?<\/code>/gi);
29
  config.extraPlugins = '';
30

    
31
  /*
32
    * Append here extra CSS rules that should be applied into the editing area.
33
    * Example:
34
    * config.extraCss = 'body {color:#FF0000;}';
35
    */
36
  config.extraCss = '';
37
  /**
38
    * Sample extraCss code for the "marinelli" theme.
39
    */
40
  if (Drupal.settings.ckeditor.theme == "marinelli") {
41
    config.extraCss += "body{background:#FFF;text-align:left;font-size:0.8em;}";
42
    config.extraCss += "#primary ol, #primary ul{margin:10px 0 10px 25px;}";
43
  }
44
  if (Drupal.settings.ckeditor.theme == "newsflash") {
45
    config.extraCss = "body{min-width:400px}";
46
  }
47

    
48
  /**
49
    * CKEditor's editing area body ID & class.
50
    * See http://drupal.ckeditor.com/tricks
51
    * This setting can be used if CKEditor does not work well with your theme by default.
52
    */
53
  config.bodyClass = '';
54
  config.bodyId = '';
55
  /**
56
    * Sample bodyClass and BodyId for the "marinelli" theme.
57
    */
58
  if (Drupal.settings.ckeditor.theme == "marinelli") {
59
    config.bodyClass = 'singlepage';
60
    config.bodyId = 'primary';
61
  }
62

    
63
  // Make CKEditor's edit area as high as the textarea would be.
64
  if (this.element.$.rows > 0) {
65
    config.height = this.element.$.rows * 20 + 'px';
66
  }
67
}
68

    
69
/*
70
 * Sample toolbars
71
 */
72

    
73
//Toolbar definition for basic buttons
74
Drupal.settings.cke_toolbar_DrupalBasic = [ [ 'Format', 'Bold', 'Italic', '-', 'NumberedList','BulletedList', '-', 'Link', 'Unlink', 'Image' ] ];
75

    
76
//Toolbar definition for Advanced buttons
77
Drupal.settings.cke_toolbar_DrupalAdvanced = [
78
  ['Source'],
79
  ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],
80
  ['Undo','Redo','Find','Replace','-','SelectAll'],
81
  ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],
82
  ['Maximize', 'ShowBlocks'],
83
  '/',
84
  ['Format'],
85
  ['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
86
  ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
87
  ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'],
88
  ['Link','Unlink','Anchor','Linkit','LinkToNode','LinkToMenu']
89
];
90

    
91
// Toolbar definition for all buttons
92
Drupal.settings.cke_toolbar_DrupalFull = [
93
  ['Source'],
94
  ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],
95
  ['Undo','Redo','Find','Replace','-','SelectAll'],
96
  ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','Iframe'],
97
  '/',
98
  ['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
99
  ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
100
  ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl','-','Language'],
101
  ['Link','Unlink','Anchor','Linkit','LinkToNode', 'LinkToMenu'],
102
  '/',
103
  ['Format','Font','FontSize'],
104
  ['TextColor','BGColor'],
105
  ['Maximize', 'ShowBlocks'],
106
  ['DrupalBreak', 'DrupalPageBreak']
107
];