Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #17 from divio/bugfix/ckeditor-styles
Browse files Browse the repository at this point in the history
Fixed CKEditor styles menu
  • Loading branch information
vxsx committed Mar 22, 2018
2 parents 60f96e2 + 5cf9cff commit 2ce6407
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 38 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ djangocms-boilerplate-webpack
- Added example for preoading fonts in ``base.html`` template
- Added json generation for icons plugins
- Changed the names of the icons generated (iconset prefix is always added)
- Fixed CKEditor styles menu


2.0.1
Expand Down
71 changes: 33 additions & 38 deletions static/js/addons/ckeditor.wysiwyg.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,53 +17,48 @@
CKEDITOR.allElements = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div'];
CKEDITOR.stylesSet.add('default', [
/* Block Styles */
{ name: 'Text Lead', element: CKEDITOR.allElements, attributes: { class: 'lead' }},
{ name: 'Text Lead', element: 'p', attributes: { class: 'lead' } },
{ name: 'Text NoWrap', element: 'p', attributes: { class: 'text-nowrap' } },

{ name: 'Text Left', element: CKEDITOR.allElements, attributes: { class: 'text-left' }},
{ name: 'Text Center', element: CKEDITOR.allElements, attributes: { class: 'text-center' }},
{ name: 'Text Right', element: CKEDITOR.allElements, attributes: { class: 'text-right' }},
{ name: 'Text Justify', element: CKEDITOR.allElements, attributes: { class: 'text-justify' }},
{ name: 'Text NoWrap', element: CKEDITOR.allElements, attributes: { class: 'text-nowrap' }},
{ name: 'Spacer', element: 'div', attributes: { class: 'spacer' } },
{ name: 'Spacer Small', element: 'div', attributes: { class: 'spacer-xs' } },
{ name: 'Spacer Large', element: 'div', attributes: { class: 'spacer-lg' } },
{ name: 'Spacer Zero', element: 'div', attributes: { class: 'spacer-zero' } },

{ name: 'Spacer', element: 'div', attributes: { class: 'spacer' }},
{ name: 'Spacer Small', element: 'div', attributes: { class: 'spacer-xs' }},
{ name: 'Spacer Large', element: 'div', attributes: { class: 'spacer-lg' }},
{ name: 'Spacer Zero', element: 'div', attributes: { class: 'spacer-zero' }},
{ name: 'List Unstyled', element: 'ul', attributes: { class: 'list-unstyled' } },
{ name: 'List Inline', element: 'ul', attributes: { class: 'list-inline' } },
{ name: 'Horizontal Description', element: 'dl', attributes: { class: 'dl-horizontal' } },

{ name: 'List Unstyled', element: ['ul', 'ol'], attributes: { class: 'list-unstyled' }},
{ name: 'List Inline', element: ['ul', 'ol'], attributes: { class: 'list-inline' }},
{ name: 'Horizontal Description', element: 'dl', attributes: { class: 'dl-horizontal' }},
{ name: 'Table', element: 'table', attributes: { class: 'table' } },
{ name: 'Table Responsive', element: 'table', attributes: { class: 'table table-responsive' } },
{ name: 'Table Striped', element: 'table', attributes: { class: 'table table-striped' } },
{ name: 'Table Bordered', element: 'table', attributes: { class: 'table table-bordered' } },
{ name: 'Table Hover', element: 'table', attributes: { class: 'table table-hover' } },
{ name: 'Table Condensed', element: 'table', attributes: { class: 'table table-condensed' } },

{ name: 'Table', element: 'table', attributes: { class: 'table' }},
{ name: 'Table Responsive', element: 'table', attributes: { class: 'table-responsive' }},
{ name: 'Table Striped', element: 'table', attributes: { class: 'table-striped' }},
{ name: 'Table Bordered', element: 'table', attributes: { class: 'table-bordered' }},
{ name: 'Table Hover', element: 'table', attributes: { class: 'table-hover' }},
{ name: 'Table Condensed', element: 'table', attributes: { class: 'table-condensed' }},

{ name: 'Table Cell Active', element: ['tr', 'th', 'td'], attributes: { class: 'active' }},
{ name: 'Table Cell Success', element: ['tr', 'th', 'td'], attributes: { class: 'success' }},
{ name: 'Table Cell Warning', element: ['tr', 'th', 'td'], attributes: { class: 'warning' }},
{ name: 'Table Cell Danger', element: ['tr', 'th', 'td'], attributes: { class: 'danger' }},
{ name: 'Table Cell Info', element: ['tr', 'th', 'td'], attributes: { class: 'info' }},
{ name: 'Table Cell Active', element: 'td', attributes: { class: 'active' } },
{ name: 'Table Cell Success', element: 'td', attributes: { class: 'success' } },
{ name: 'Table Cell Warning', element: 'td', attributes: { class: 'warning' } },
{ name: 'Table Cell Danger', element: 'td', attributes: { class: 'danger' } },
{ name: 'Table Cell Info', element: 'td', attributes: { class: 'info' } },

/* Inline Styles */
{ name: 'Text Primary', element: 'span', attributes: { class: 'text-primary' }},
{ name: 'Text Success', element: 'span', attributes: { class: 'text-success' }},
{ name: 'Text Info', element: 'span', attributes: { class: 'text-info' }},
{ name: 'Text Warning', element: 'span', attributes: { class: 'text-warning' }},
{ name: 'Text Danger', element: 'span', attributes: { class: 'text-danger' }},
{ name: 'Text Muted', element: 'span', attributes: { class: 'text-muted' }},
{ name: 'Text Primary', element: 'span', attributes: { class: 'text-primary' } },
{ name: 'Text Success', element: 'span', attributes: { class: 'text-success' } },
{ name: 'Text Info', element: 'span', attributes: { class: 'text-info' } },
{ name: 'Text Warning', element: 'span', attributes: { class: 'text-warning' } },
{ name: 'Text Danger', element: 'span', attributes: { class: 'text-danger' } },
{ name: 'Text Muted', element: 'span', attributes: { class: 'text-muted' } },

{ name: 'Image Responsive', element: 'img', attributes: { class: 'img-responsive' }},
{ name: 'Image Rounded', element: 'img', attributes: { class: 'img-rounded' }},
{ name: 'Image Circle', element: 'img', attributes: { class: 'img-circle' }},
{ name: 'Image Thumbnail', element: 'img', attributes: { class: 'img-thumbnail' }},
{ name: 'Image Responsive', element: 'img', attributes: { class: 'img-responsive' } },
{ name: 'Image Rounded', element: 'img', attributes: { class: 'img-rounded' } },
{ name: 'Image Circle', element: 'img', attributes: { class: 'img-circle' } },
{ name: 'Image Thumbnail', element: 'img', attributes: { class: 'img-thumbnail' } },

{ name: 'Pull Left', element: CKEDITOR.allElements, attributes: { class: 'pull-left' }},
{ name: 'Pull Right', element: CKEDITOR.allElements, attributes: { class: 'pull-right' }},
{ name: 'Pull Left', element: 'div', attributes: { class: 'pull-left' } },
{ name: 'Pull Right', element: 'div', attributes: { class: 'pull-right' } },

{ name: 'Blockquote Reverse', element: 'blockquote', attributes: { class: 'blockquote-reverse' }},
{ name: 'Blockquote Reverse', element: 'blockquote', attributes: { class: 'blockquote-reverse' } },
]);

/*
Expand Down

0 comments on commit 2ce6407

Please sign in to comment.