'. 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. This is also the only way to define new toolbar sets.', 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' => drupal_get_path('module', 'ckeditor') .'/ckeditor/config.js', '%ckeditor_config_file' => 'config.js', )) .'

'; break; case 'admin/settings/ckeditor/editg': case 'admin/settings/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/settings/ckeditor': $output = '

'. t('The CKEditor module allows Drupal to replace textarea fields with a rich text or !wysiwyg editor. This editor brings many of the powerful functionalities of known desktop editors like Word to the web. It\'s relatively lightweight and doesn\'t require any kind of installation on the client computer.', array( '!wysiwyg' => ''. t('WYSIWYG') .'', )) .'

'. '

'. t('More information about the editor is located at the !ckeditorlink. A small !userguidelink is available.', array( '!ckeditorlink' => l(t('CKEditor homepage'), 'http://ckeditor.com'), '!userguidelink' => l(t('user guide'), 'http://docs.cksource.com/FCKeditor_2.x/Users_Guide/Quick_Reference'), )) .'

'. '

'. t('Profiles can be defined based on user roles. A CKEditor profile can define which pages receive this CKEditor capability, what buttons or themes are enabled for the editor, how the editor is displayed, and a few other editor functions. It is possible also to define the Global Profile that will hold values that will be appended to all other profiles.') .'

'. '

'. t('Lastly, only users with the %accesspermission !permissionlink will be able to use CKEditor.', array( '%accesspermission' => t('access ckeditor'), '!permissionlink' => l(t('permission'), 'admin/user/permissions') )) .'

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

'. t('The CKEditor module allows Drupal to replace textarea fields with a rich text or !wysiwyg editor. This editor brings many of the powerful functionalities of known desktop editors like Word to the web. It\'s relatively lightweight and doesn\'t require any kind of installation on the client computer.', array( '!wysiwyg' => ''. t('WYSIWYG') .'', )) .'

'; $output .= '

'. t('More information about the editor is located at the !ckeditorlink. A small !userguidelink is available.', array( '!ckeditorlink' => l(t('CKEditor homepage'), 'http://ckeditor.com'), '!userguidelink' => l(t('user guide'), 'http://docs.cksource.com/FCKeditor_2.x/Users_Guide/Quick_Reference'), )) .'

'. $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.', 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('Grant permissions for use of CKEditor in !adminpath.', array( '!adminpath' => l(t('Administer') .' > '. t('User management') .' > '. t('Permissions'), 'admin/user/permissions'), )) .'
  6. '; $output .= '
  7. '. t('Under !adminpath, adjust the ckeditor profiles. In each profile you can choose which textareas will be replaced by CKEditor, select default toolbar and configure some more advanced settings.', array( '!adminpath' => l(t('Administer') .' > '. t('Site configuration') .' > '. t('CKEditor'), 'admin/settings/ckeditor'), )) .'
  8. '; $output .= '
  9. '. 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/settings/filters'), )) . '
    '. 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('README.txt', drupal_get_path('module', 'ckeditor') .'/README.txt') )) .''; $output .= '
      2. '. t('To have a better control over line breaks, you should disable %settingname in the chosen filter (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 .= ''; $output .= '

        '. t('Defining field inclusion/exclusions') .'

        '; $output .= '

        '. t('In order to specifically display CKEditor on those text areas on which you need it, the CKEditor module provides a powerfull method to define fields that should be enhanced with CKEditor. The first choice you have to make is whether you want to display CKEditor on all textareas and define a list of exceptions, or if you don\'t want to display CKEditor unless it is specifically enabled. This choice is made in the %settingname setting.', array( '%settingname' => t('Use inclusion or exclusion mode'), )) .'

        '; $output .= '

        '. t('Next, the list of exceptions has to be defined. This list follows a specific syntax: the path to a field is defined by specifying the content type followed by @ character, specifying the path followed by dot and appending the field name at the end. You may decide to not use the content type. The field %fieldname on page %pathname would thus be addressed as %result. You can use wildcards * and ? anywhere in this line. If you have a dot in your field name and it causes problems, you can escape it with a slash (\).', array( '%fieldname' => 'edit-log', '%pathname' => 'node/add/page', '%result' => 'node/add/page.edit-log', )) .'

        '; $output .= ''. t('Some examples:') .''; $output .= '
          '; $output .= '
        • node/add/page: '. t('matches all fields on %pathname', array('%pathname' => 'node/add/page')) .'
        • '; $output .= '
        • *.edit-log: '. t('matches all fields called %fieldname on any page', array('%fieldname' => 'edit-log')) .'
        • '; $output .= '
        • blog@*.edit-body: '. t('matches all fields called %fieldname on pages related to node type %typename', array('%fieldname' => 'edit-body', '%typename' => 'blog')) .'
        • '; $output .= '
        • forum@*.*: '. t('matches all fields on pages related to node type %nodetype', array('%nodetype' => 'forum')) .'
        • '; $output .= '
        • node/add/*: '. t('matches all fields on pages such as %pathname1, %pathname2, etc.', array('%pathname1' => 'node/add/page', '%pathname2' => 'node/add/story')) .'
        • '; $output .= '
        • node/add/*.edit-log: '. t('matches all %fieldname fields on pages such as %pathname1, %pathname2, etc.', array('%fieldname' => 'edit-log', '%pathname1' => 'node/add/page', '%pathname2' => 'node/add/story')) .'
        • '; $output .= '
        • node/add/*.edit-user-*: '. t('matches fields starting with %fieldname on pages starting with %pathname', array('%fieldname' => 'edit-user-', '%pathname' => 'node/add/')) .'
        • '; $output .= '
        '; $output .= '

        '. t('Troubleshooting') .'

        '; $output .= '

        '; $output .= t('Take a look at !listlink when installing CKEditor (or check !troubleshooting).', array( '!listlink' => l(t('the list of common problems'), 'http://drupal.ckeditor.com/troubleshooting'), '!troubleshooting' => l('TROUBLESHOOTING.txt', drupal_get_path('module', 'ckeditor') .'/TROUBLESHOOTING.txt') )); $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.fckeditor.net/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, !iblink or !webfmlink.', array( '!imcelink' => l(t('IMCE'), 'http://drupal.org/project/imce'), '!iblink' => l(t('Image Browser'), 'http://drupal.org/project/imagebrowser'), '!webfmlink' => l(t('Web File Manager'), 'http://drupal.org/project/webfm'), )) .'
        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'])) { exit; } $text = $_POST['text']; $text = strtr($text, array('' => '__COMMENT__END__')); foreach ($_POST['filters'] as $module_delta) { if (!is_string($module_delta)) { continue; } $module = strtok($module_delta, "/"); $delta = strtok("/"); $format = strtok("/"); if (!module_hook($module, 'filter')) { continue; } //built-in filter module, a special case where we would like to strip XSS and nothing more if ($module == 'filter' && $delta == 0) { preg_match_all("|]*)>|i", $text, $matches); if ($matches[1]) { $tags = array_unique($matches[1]); $text = filter_xss($text, $tags); } } else { $text = module_invoke($module, 'filter', 'process', $delta, $format, $text); } } $text = strtr($text, array('__COMMENT__START__' => '')); echo $text; exit; }