2

I have copied ckeditor.styles.js to /themes/seven/ckeditor.styles.js, and in the configuration page /admin/config/content/ckeditor/edit/Advanced I altered the predefined styles drop down to point to this new file:

if(typeof(CKEDITOR) !== 'undefined') {
    CKEDITOR.addStylesSet( 'drupal',
    [
            { name: 'Larger', element: 'span', attributes: {'class': 'size-1'} },
            { name: 'Epic', element: 'span', attributes: {'class': 'size-2'} },
            { name: 'MASSIVE', element: 'span', attributes: {'class': 'size-3'} },
            { name: 'Stupid!', element: 'span', attributes: {'class': 'size-4'} },
    ]);
}

Now when I load the WYSIWYG editor I still see other styles in the styles dropdown:

Styles Drop Down

How do I remove the other styles that are not present in my ckeditor.styles.js file?

I have searched through all the code but can't find any reference to div.widthMarker or div.sortableListDiv except for in a .CSS file, but not everything in the CSS file is showing up.

Cheers,
- Paul

3

In CKEditor profile settings /admin/config/content/ckeditor
click the edit link on the profile you want to change.

Under "Editor Appearance" uncheck "Stylesheet Parser plugin" and save. This will remove the default classes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.