' . t('CKEditor is highly configurable. The most commonly used features are listed below. You can also customize CKEditor to your needs by changing the configuration file: %ckeditor_module_config.', array( '%ckeditor_module_config' => drupal_get_path('module', 'ckeditor') . '/ckeditor.config.js', )) . '

'; $output .= '

' . t('It is advised to not edit the configuration file that is distributed with CKEditor: %ckeditor_config_file (%ckeditor_config_path) because you may overwrite it accidentally when you update the editor.', array( '%ckeditor_config_path' => ckeditor_path(true) . '/config.js', '%ckeditor_config_file' => 'config.js', )) . '

'; break; case 'admin/config/content/ckeditor/editg': case 'admin/config/content/ckeditor/add': $output = '

' . t('The Global Profile allows you to define settings that are common for all profiles. Values defined in other profiles will be appended to the global configuration. This way you can avoid repeating some of the settings that are usually the same in each profile.') . '

'; break; case 'admin/config/content/ckeditor': $output = '

' . t('The CKEditor module allows Drupal to replace textarea fields with CKEditor. CKEditor is a text editor to be used inside web pages. It\'s a !wysiwyg editor, which means that the text being edited on it looks as similar as possible to the results users have when publishing it. It brings to the web common editing features found on desktop editing applications like Microsoft Word and OpenOffice.', array( '!wysiwyg' => '' . t('WYSIWYG') . '', )) . '

' . '

' . t('Useful links: !ckeditorlink | !devguidelink | !userguidelink.', array( '!ckeditorlink' => l(t('CKEditor web site'), 'http://ckeditor.com'), '!devguidelink' => l(t('Developer\'s Guide'), 'http://docs.cksource.com/CKEditor_3.x/Developers_Guide'), '!userguidelink' => l(t('User\'s Guide'), 'http://docs.cksource.com/CKEditor_3.x/Users_Guide') )) . '

' . '

' . t('Profiles are linked with input format types. A CKEditor profile defines what buttons are available in the editor, how the editor is displayed, and a few other editor functions. The Global Profile holds some general information about CKEditor.') . '

'; break; case 'admin/help#ckeditor': $output = '

' . t('Introduction') . '

'; $output .= '

' . t('The CKEditor module allows Drupal to replace textarea fields with CKEditor. CKEditor is a text editor to be used inside web pages. It\'s a !wysiwyg editor, which means that the text being edited on it looks as similar as possible to the results users have when publishing it. It brings to the web common editing features found on desktop editing applications like Microsoft Word and OpenOffice.', array( '!wysiwyg' => '' . t('WYSIWYG') . '', )) . '

'; $output .= '

' . t('Useful links: !ckeditorlink | !devguidelink | !userguidelink.', array( '!ckeditorlink' => l(t('CKEditor web site'), 'http://ckeditor.com'), '!devguidelink' => l(t('Developer\'s Guide'), 'http://docs.cksource.com/CKEditor_3.x/Developers_Guide'), '!userguidelink' => l(t('User\'s Guide'), 'http://docs.cksource.com/CKEditor_3.x/Users_Guide') )) . '

'; $output .= '

' . t('Configuration') . '

'; $output .= '
    '; $output .= '
  1. ' . t('Go to the !ckeditorlink and download the latest version of CKEditor. Then uncompress the contents of the ckeditor directory of the downloaded file to %ckeditordir (or into sites/all/libriaries/ckeditor).', array( '!ckeditorlink' => l(t('CKEditor homepage'), 'http://ckeditor.com/download'), '%ckeditordir' => base_path() . drupal_get_path('module', 'ckeditor') . '/ckeditor/', )) . '
  2. '; $output .= '
  3. ' . t('Enable the module as usual from Drupal\'s admin pages.') . '
  4. '; $output .= '
  5. ' . t('Under !adminpath, adjust the ckeditor profiles. Profiles determine what options are available to users based on input format system.', array( '!adminpath' => l(t('Administration panel') . ' > ' . t('Configuration') . ' > ' . t('Content Authoring') . ' > ' . t('CKEditor'), 'admin/config/content/ckeditor'), )) . '
  6. '; $output .= '
  7. ' . t('For the Rich Text Editing to work you also need to configure your !filterlink for the users that may access Rich Text Editing. Either grant those users Full HTML access or use the following list of tags in the HTML filter:', array( '!filterlink' => l(t('filters'), 'admin/config/content/formats'), )) . '
    ' . htmlspecialchars('




      1.  
        ') . '
        '; $output .= t('If you\'re going to use CKEditor with Filtered HTML input format, please read also "Setting up filters" section in !readme', array( '!readme' => l(t('README.txt'), $base_url . '/' . drupal_get_path('module', 'ckeditor') . '/README.txt', array('absolute' => TRUE)) )) . ''; $output .= '
      2. ' . t('To have a better control over line breaks, you should disable %settingname in the chosen Text format (recommended).', array( '%settingname' => t('Line break converter'), )) . '
      3. '; $output .= '
      4. ' . t('Modify the %ckconfig file to your custom needs (optional). Available configuration settings are available in the !apidocs.', array( '%ckconfig' => base_path() . drupal_get_path('module', 'ckeditor') . '/ckeditor/ckeditor.config.js', '!apidocs' => l(t('API documentation'), 'http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html') )) . '
      5. '; $output .= ''; $output .= '

        ' . t('Troubleshooting') . '

        '; $output .= '

        '; $output .= t('Take a look at !listlink when installing CKEditor.', array( '!listlink' => l(t('the list of common problems'), 'http://drupal.ckeditor.com/troubleshooting') )); $output .= ' ' . t('If you are looking for more information, have any trouble in configuration or if you found an issue, please visit the !officiallink.', array('!officiallink' => l(t('official project page'), 'http://drupal.org/project/ckeditor'))); $output .= ' ' . t('More information about how to tune up CKEditor for your theme can be found !herelink.', array('!herelink' => l(t('here'), 'http://drupal.ckeditor.com/tricks'))); $output .= '

        '; $output .= '

        ' . t('Uploading images and files') . '

        '; $output .= '

        ' . t('There are three ways for uploading files:') . '

        '; $output .= '
          '; $output .= '
        1. ' . t('By using !ckfinder (commercial).', array( '!ckfinder' => l(t('CKFinder'), 'http://ckfinder.com'), )) . '
        2. '; $output .= '
        3. ' . t('By using a module like !imcelink.', array( '!imcelink' => l(t('IMCE'), 'http://drupal.org/project/imce') )) . '
        4. '; $output .= '
        5. ' . t('By using the core upload module.') . '
        6. '; $output .= '
        '; break; } return!empty($output) ? $output : ''; } /** * AJAX callback - XSS filter */ function ckeditor_filter_xss() { $GLOBALS['devel_shutdown'] = FALSE; if (!isset($_POST['text']) || !is_string($_POST['text']) || !is_array($_POST['filters']) || !isset($_POST['input_format']) || !is_string($_POST['input_format'])) { exit; } $text = check_markup($_POST['text'], $_POST['input_format']); $filters = filter_get_filters(); $format_filters = filter_list_format($_POST['input_format']); foreach ($_POST['filters'] as $name) { if ($name == "default") { preg_match_all("|]*)>|i", $text, $matches); if ($matches[1]) { $tags = array_unique($matches[1]); $text = filter_xss($text, $tags); } continue; } if (!isset($filters[$name]) || !isset($filters[$name]['process callback']) || (array_key_exists($name, $format_filters)) && $format_filters[$name]->status) { continue; } $text = $filters[$name]['process callback']($text, $format_filters[$name]); } echo $text; }