You are here

n1ed.module in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8

Same filename and directory in other branches
  1. 8.2 n1ed.module
  2. 7 n1ed.module

Main code for N1ED module.

File

n1ed.module
View source
<?php

/**
 * @file
 * Main code for N1ED module.
 */

/**
 * Implements hook_ckeditor_plugin().
 */
function n1ed_plugin() {
  return array(
    'n1ed' => array(
      'name' => 'N1ED',
      'desc' => t('N1ED. See <a href=":addon_page_url">@addon_page_title</a> for more details.', array(
        ':addon_page_url' => 'https://n1ed.com',
        '@addon_page_title' => t('addon page'),
      )),
      'path' => base_path() . 'libraries/N1ED',
    ),
  );
}
function n1ed_editor_js_settings_alter(array &$settings) {
  error_log('/' . drupal_get_path('module', 'n1ed') . "/js/skin/n1ed/");
  foreach (array_keys($settings['editor']['formats']) as $text_format_id) {
    if ($settings['editor']['formats'][$text_format_id]['editor'] === 'ckeditor') {
      $settings['editor']['formats'][$text_format_id]['editorSettings']['skin'] = 'n1ed,/' . drupal_get_path('module', 'n1ed') . "/js/skin/n1ed/";
    }
  }
}

Functions

Namesort descending Description
n1ed_editor_js_settings_alter
n1ed_plugin Implements hook_ckeditor_plugin().