You are here

wysiwyg_linebreaks.module in Wysiwyg Linebreaks 6

Same filename and directory in other branches
  1. 7 wysiwyg_linebreaks.module

Module adds a Wywisyg API plugin that converts p and br tags to linebreaks, and vice-versa.

File

wysiwyg_linebreaks.module
View source
<?php

/**
 * @file
 *
 * Module adds a Wywisyg API plugin that converts p and br tags to linebreaks,
 * and vice-versa.
 */

/**
 * Implementation of hook_wysiwyg_include_directory().
 */
function wysiwyg_linebreaks_wysiwyg_include_directory($type) {
  switch ($type) {
    case 'plugins':
      return $type;
  }
}

/**
 * Implementation of hook_init().
 */
function wysiwyg_linebreaks_init() {

  // Add CSS to hide toolbar buttons
  // @todo - don't load this on every page - only pages where WYSIWYG textfields
  // might appear. (hook_init() might not be our best option).
  drupal_add_css(drupal_get_path('module', 'wysiwyg_linebreaks') . '/wysiwyg_linebreaks.css');
}