Created
December 9, 2014 20:57
-
-
Save reubenmoes/1be9513f7d9e681844ca to your computer and use it in GitHub Desktop.
ckeditor.styles.js example
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
/* | |
* This file is used/requested by the 'Styles' button. | |
* The 'Styles' button is not enabled by default in DrupalFull and DrupalFiltered toolbars. | |
*/ | |
if(typeof(CKEDITOR) !== 'undefined') { | |
CKEDITOR.addStylesSet( 'drupal', | |
[ | |
/* Block Styles */ | |
// These styles are already available in the "Format" drop-down list, so they are | |
// not needed here by default. You may enable them to avoid placing the | |
// "Format" drop-down list in the toolbar, maintaining the same features. | |
{ name : 'Paragraph' , element : 'p', attributes : { 'class' : ''}}, | |
{ name : 'Quote' , element : 'p', attributes : { 'class' : 'quote'}}, | |
{ name : 'Heading 1' , element : 'h1', attributes : { 'class' : ''}}, | |
{ name : 'Heading 2' , element : 'h2', attributes : { 'class' : ''}}, | |
{ name : 'Heading 3' , element : 'h3', attributes : { 'class' : ''}}, | |
{ name : 'Heading 4' , element : 'h4', attributes : { 'class' : ''}}, | |
{ name : 'Heading 5' , element : 'h5', attributes : { 'class' : ''}}, | |
/* { name : 'Large' , element : 'p', attributes : { 'class' : 'large' } }, */ | |
/* Inline Styles */ | |
// These are core styles available as toolbar buttons. You may opt enabling | |
// some of them in the "Styles" drop-down list, removing them from the toolbar. | |
/* | |
{ name : 'Strong' , element : 'strong', overrides : 'b' }, | |
{ name : 'Emphasis' , element : 'em' , overrides : 'i' }, | |
{ name : 'Underline' , element : 'u' }, | |
{ name : 'Strikethrough' , element : 'strike' }, | |
{ name : 'Subscript' , element : 'sub' }, | |
{ name : 'Superscript' , element : 'sup' }, | |
*/ | |
/* | |
{ name : 'Marker: Yellow' , element : 'span', styles : { 'background-color' : 'Yellow' } }, | |
{ name : 'Marker: Green' , element : 'span', styles : { 'background-color' : 'Lime' } }, | |
{ name : 'Big' , element : 'big' }, | |
{ name : 'Small' , element : 'small' }, | |
{ name : 'Typewriter' , element : 'tt' }, | |
{ name : 'Computer Code' , element : 'code' }, | |
{ name : 'Keyboard Phrase' , element : 'kbd' }, | |
{ name : 'Sample Text' , element : 'samp' }, | |
{ name : 'Variable' , element : 'var' }, | |
{ name : 'Deleted Text' , element : 'del' }, | |
{ name : 'Inserted Text' , element : 'ins' }, | |
{ name : 'Cited Work' , element : 'cite' }, | |
{ name : 'Inline Quotation' , element : 'q' }, | |
{ name : 'Language: RTL' , element : 'span', attributes : { 'dir' : 'rtl' } }, | |
{ name : 'Language: LTR' , element : 'span', attributes : { 'dir' : 'ltr' } }, | |
*/ | |
/* Object Styles */ | |
{ | |
name : 'Image on Left', | |
element : 'img', | |
attributes : | |
{ | |
'class': 'image-left' | |
} | |
}, | |
{ | |
name : 'Image on Right', | |
element : 'img', | |
attributes : | |
{ | |
'class': 'image-right' | |
} | |
} | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment