Last active
August 29, 2015 14:04
-
-
Save makbeta/b083c63e2b28d63b8c82 to your computer and use it in GitHub Desktop.
Creating custom classes in CKEditor in Drupal
This file contains hidden or 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
if(typeof(CKEDITOR) !== 'undefined') { | |
CKEDITOR.stylesSet.add( 'drupal', [ | |
// Block-level styles | |
{ name: 'Float Left', element: 'p', attributes: { 'class': 'left'} }, | |
{ name: 'Float Right' , element: 'p', attributes: { 'class': 'right'} }, | |
// Inline styles | |
{ name: 'Small Text', element: 'small' } | |
] ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment