Projet

Général

Profil

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

root / drupal7 / sites / all / modules / ckeditor / ckeditor.config.js @ 2e0f6994

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
  // Insert all Smiley image paths as relative or they may fail on SSL pages.
32
  config.smiley_path = window.CKEDITOR_BASEPATH + 'plugins/smiley/images/';
33

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

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

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

    
72
/*
73
 * Sample toolbars
74
 */
75

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

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

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