/[drupal]/contributions/modules/wysiwyg/editors/ckeditor.inc
ViewVC logotype

Diff of /contributions/modules/wysiwyg/editors/ckeditor.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2.4.3 by twod, Fri Oct 23 02:10:53 2009 UTC revision 1.2.4.4 by twod, Tue Nov 17 15:31:17 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: ckeditor.inc,v 1.2.4.2 2009/10/20 02:46:42 twod Exp $  // $Id: ckeditor.inc,v 1.2.4.3 2009/10/23 02:10:53 twod Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 23  function wysiwyg_ckeditor_editor() { Line 23  function wysiwyg_ckeditor_editor() {
23        ),        ),
24        'src' => array(        'src' => array(
25          'title' => 'Source',          'title' => 'Source',
26           'files' => array(          'files' => array(
27            'ckeditor_source.js' => array('preprocess' => FALSE),            'ckeditor_source.js' => array('preprocess' => FALSE),
28          ),          ),
29        ),        ),
# Line 92  function wysiwyg_ckeditor_version($edito Line 92  function wysiwyg_ckeditor_version($edito
92  function wysiwyg_ckeditor_themes($editor, $profile) {  function wysiwyg_ckeditor_themes($editor, $profile) {
93    // @todo Skins are not themes but this will do for now.    // @todo Skins are not themes but this will do for now.
94    $path = $editor['library path'] . '/skins/';    $path = $editor['library path'] . '/skins/';
95    $dir_handle = @opendir($path) or drupal_set_message('Unable to open ' . $path, $type = 'error');    if (file_exists($path) && ($dir_handle = opendir($path))) {
96    $themes = array();      $themes = array();
97    while ($file = readdir($dir_handle)) {      while ($file = readdir($dir_handle)) {
98      if($file!="." && $file!=".." && $file!="CVS" && $file!=".svn") {        if (is_dir($path . $file) && substr($file, 0, 1) != '.' && $file != 'CVS') {
99        $themes[] = $file;          $themes[] = $file;
100          }
101      }      }
102        closedir($dir_handle);
103        return !empty($themes) ? $themes : array('default');
104      }
105      else {
106        return array('default');
107    }    }
   closedir($dir_handle);  
   return $themes;  
108  }  }
109    
110  /**  /**
# Line 122  function wysiwyg_ckeditor_settings($edit Line 126  function wysiwyg_ckeditor_settings($edit
126      'baseHref' => base_path(),      'baseHref' => base_path(),
127      'width' => '100%',      'width' => '100%',
128      'height' => 420,      'height' => 420,
129      // Skin is not really the same as theme.      // @todo Do not use skins as themes and add separate skin handling.
130      'theme' => 'default',      'theme' => 'default',
131      'skin' => $theme,      'skin' => !empty($theme) ? $theme : 'kama',
132      // By default, CKeditor converts most characters into HTML entities. Since      // By default, CKeditor converts most characters into HTML entities. Since
133      // it does not support a custom definition, but Drupal supports Unicode, we      // it does not support a custom definition, but Drupal supports Unicode, we
134      // disable at least the additional character sets. CKeditor always converts      // disable at least the additional character sets. CKeditor always converts
# Line 162  function wysiwyg_ckeditor_settings($edit Line 166  function wysiwyg_ckeditor_settings($edit
166      }      }
167    }    }
168    
   // Language  
169    if (isset($config['language'])) {    if (isset($config['language'])) {
170      $settings['language'] = $config['language'];      $settings['language'] = $config['language'];
171    }    }
   // Resizing button  
172    if (isset($config['resizing'])) {    if (isset($config['resizing'])) {
173      $settings['resize_enabled'] = $config['resizing'];      $settings['resize_enabled'] = $config['resizing'];
174    }    }
   //Toolbar location  
175    if (isset($config['toolbar_loc'])) {    if (isset($config['toolbar_loc'])) {
176      $settings['toolbarLocation'] = $config['toolbar_loc'];      $settings['toolbarLocation'] = $config['toolbar_loc'];
177    }    }
# Line 270  function wysiwyg_ckeditor_proxy_plugin_s Line 271  function wysiwyg_ckeditor_proxy_plugin_s
271    
272  /**  /**
273   * Return internal plugins for this editor; semi-implementation of hook_wysiwyg_plugin().   * Return internal plugins for this editor; semi-implementation of hook_wysiwyg_plugin().
  *  
  * Excluded native plugins: About, Button, Checkbox, Form, HiddenField,  
  * ImageButton, NewPage, PageBreak, Print, Radio, Select, Save, TextField,  
  * Textarea, Templates.  
274   */   */
275  function wysiwyg_ckeditor_plugins($editor) {  function wysiwyg_ckeditor_plugins($editor) {
276    $plugins = array(    $plugins = array(
277      'default' => array(      'default' => array(
278        'buttons' => array(        'buttons' => array(
279          'Bold' => t('Bold'), 'Italic' => t('Italic'), 'Underline' => t('Underline'),          'Bold' => t('Bold'), 'Italic' => t('Italic'), 'Underline' => t('Underline'),
280          'StrikeThrough' => t('Strike-through'),          'Strike' => t('Strike-through'),
281          'JustifyLeft' => t('Align left'), 'JustifyCenter' => t('Align center'), 'JustifyRight' => t('Align right'), 'JustifyFull' => t('Justify'),          'JustifyLeft' => t('Align left'), 'JustifyCenter' => t('Align center'), 'JustifyRight' => t('Align right'), 'JustifyBlock' => t('Justify'),
282          'BulletedList' => t('Bullet list'), 'NumberedList' => t('Numbered list'),          'BulletedList' => t('Bullet list'), 'NumberedList' => t('Numbered list'),
283          'Outdent' => t('Outdent'), 'Indent' => t('Indent'),          'Outdent' => t('Outdent'), 'Indent' => t('Indent'),
284          'Undo' => t('Undo'), 'Redo' => t('Redo'),          'Undo' => t('Undo'), 'Redo' => t('Redo'),
# Line 292  function wysiwyg_ckeditor_plugins($edito Line 289  function wysiwyg_ckeditor_plugins($edito
289          'Blockquote' => t('Blockquote'), 'Source' => t('Source code'),          'Blockquote' => t('Blockquote'), 'Source' => t('Source code'),
290          'HorizontalRule' => t('Horizontal rule'),          'HorizontalRule' => t('Horizontal rule'),
291          'Cut' => t('Cut'), 'Copy' => t('Copy'), 'Paste' => t('Paste'),          'Cut' => t('Cut'), 'Copy' => t('Copy'), 'Paste' => t('Paste'),
292          'PasteText' => t('Paste Text'), 'PasteWord' => t('Paste from Word'),          'PasteText' => t('Paste Text'), 'PasteFromWord' => t('Paste from Word'),
293          'ShowBlocks' => t('Show blocks'),          'ShowBlocks' => t('Show blocks'),
294          'RemoveFormat' => t('Remove format'),          'RemoveFormat' => t('Remove format'),
295          'SpecialChar' => t('Character map'),          'SpecialChar' => t('Character map'),
# Line 300  function wysiwyg_ckeditor_plugins($edito Line 297  function wysiwyg_ckeditor_plugins($edito
297          'Format' => t('HTML block format'), 'Font' => t('Font'), 'FontSize' => t('Font size'), 'Styles' => t('Font style'),          'Format' => t('HTML block format'), 'Font' => t('Font'), 'FontSize' => t('Font size'), 'Styles' => t('Font style'),
298          'Table' => t('Table'),          'Table' => t('Table'),
299          'Find' => t('Search'), 'Replace' => t('Replace'), 'SelectAll' => t('Select all'),          'Find' => t('Search'), 'Replace' => t('Replace'), 'SelectAll' => t('Select all'),
         'CreateDiv' => t('Create DIV container'),  
300          'Flash' => t('Flash'), 'Smiley' => t('Smiley'),          'Flash' => t('Flash'), 'Smiley' => t('Smiley'),
301          'FitWindow' => t('FitWindow'),          'Maximize' => t('Maximize'),
302          'SpellChecker' => t('Check spelling'), 'Scayt' => t('Check spelling as you type'),          'SpellChecker' => t('Check spelling'), 'Scayt' => t('Check spelling as you type'),
303        ),        ),
304        'internal' => TRUE,        'internal' => TRUE,

Legend:
Removed from v.1.2.4.3  
changed lines
  Added in v.1.2.4.4

  ViewVC Help
Powered by ViewVC 1.1.3