Skip to content

Instantly share code, notes, and snippets.

@robinvdvleuten
Created February 24, 2012 16:15
Show Gist options
  • Save robinvdvleuten/1901824 to your computer and use it in GitHub Desktop.
Save robinvdvleuten/1901824 to your computer and use it in GitHub Desktop.
Add your own styles to Drupal's WYSIWYG module
<?php
function ckeditor_styles_wysiwyg_editor_settings_alter(&$settings, &$context)
{
if ($context['profile']->editor == 'ckeditor') {
$settings['extraPlugins'] .= ',stylesheetparser';
// Not necessary but removes all default styles from the CKEditor.
$settings['stylesSet'] = array();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment