Last active
August 29, 2015 14:07
-
-
Save kae76/37a070c613450b0392f4 to your computer and use it in GitHub Desktop.
Created a custom module: A simple fix for WYSIWYG making the configuration site wide. This fulfilled the initial user story requirements.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file custom.module | |
* Drupal site build. | |
*/ | |
/** | |
* Implements hook_wysiwyg_editor_settings_alter(). | |
*/ | |
function wo_custom_wysiwyg_editor_settings_alter(&$settings, $context) { | |
// Ckeditor specific | |
if ($context['profile']->editor == 'ckeditor') { | |
// Remove formatting from pasting. | |
$settings['forcePasteAsPlainText'] = '1'; | |
// Remove any tool bar customisation to set up our own. | |
unset($settings['toolbar']); | |
$settings['toolbar'][] = array( | |
'Bold', | |
'Italic', | |
'BulletedList', | |
'NumberedList', | |
'Scayt', | |
'Link', | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment