Remove extra tag p on ckeditor on wysiwyg

issue - https://drupal.org/node/669114
source - https://drupal.org/node/669114#comment-5611764

/**
 * Implementation of hook_wysiwyg_editor_settings_alter()
 */
function MYMODULE_wysiwyg_editor_settings_alter(&$settings, $context) {
  if ($context['profile']->editor == 'ckeditor') {
    // set various CKEditor option to address problem with extra p tags being added
    $settings['enterMode'] = 2;
    $settings['forceEnterMode'] = true;
    $settings['shiftEnterMode'] = 1;
 
    // Example of setting customConfig option. Just note it gets overridden by values in $settings.
    //$settings['customConfig'] = 'path/to/my/config.js';
  }
}
Category: