You are here

function ckeditor_config_help in CKEditor custom config 8.2

Same name and namespace in other branches
  1. 8.3 ckeditor_config.module \ckeditor_config_help()

Implements hook_help().

File

./ckeditor_config.module, line 13
Provides UI to manage CKEditor configuration.

Code

function ckeditor_config_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.ckeditor_config':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('CKEditor custom config allows for custom CKEditor configuration to be attached to individual editors.') . '</p>';
      $output .= '<p>' . t('See <a href="@url">https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html</a> for configuration options.', [
        '@url' => 'https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html',
      ]) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Adding custom configuration to an editor') . '</dt>';
      $output .= '<dd>';
      $output .= '<p>' . t('Navigate to an editor configuration page (/admin/config/content/formats/manage/[editor]).') . '</p>';
      $output .= '<p>' . t('On the configuration page, navigate to <em>CKEditor custom configuration</em> under <em>CKEditor plugin settings</em>.') . '</p>';
      $output .= '<p>' . t('Enter custom configuration with each item on its own line formatted as <code>[setting.name] = [value]</code>') . '</p>';
      $output .= '<p>';
      $output .= t('Examples:<br>');
      $output .= t('<code>forcePasteAsPlainText = true</code><br>');
      $output .= t('<code>forceSimpleAmpersand = true</code>');
      $output .= '</p>';
      $output .= '</dd>';
      $output .= '</dl>';
      return $output;
  }
}