Skip to content

Instantly share code, notes, and snippets.

@chluehr
Created December 9, 2015 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chluehr/d608bb00c58ebb7240f2 to your computer and use it in GitHub Desktop.
Save chluehr/d608bb00c58ebb7240f2 to your computer and use it in GitHub Desktop.
/* /website/static/js/editmode/wysiwyg.js */
CKEDITOR.stylesSet.add( 'custom_styles', [
// Paragraph Styles
{ name: 'Regular Text', element: 'p', attributes: { 'class': '' }},
{ name: 'Large Text', element: 'p', attributes: { 'class': 'content__text-L' } }
]);
CKEDITOR.editorConfig = function( config ) {
// add our custom styles
config.stylesSet = 'custom_styles';
config.toolbar = 'Basic';
};
/* use in Pimcore like this:
<?= $this->wysiwyg('custom_wysiwyg', ["customConfig" => "/website/static/js/editmode/wysiwyg.js"]); ?>
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment