Projet

Général

Profil

Paste
Télécharger (3,78 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / ckeditor / ckeditor.config.js @ 503b3f7b

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
  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
  if (Drupal.settings.ckeditor.theme == "marinelli") {
39
    config.extraCss += "body{background:#FFF;text-align:left;font-size:0.8em;}";
40
    config.extraCss += "#primary ol, #primary ul{margin:10px 0 10px 25px;}";
41
  }
42
  if (Drupal.settings.ckeditor.theme == "newsflash") {
43
    config.extraCss = "body{min-width:400px}";
44
  }
45

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

    
62
/*
63
 * Sample toolbars
64
 */
65

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

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

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