This repository has been archived by the owner on Jan 11, 2019. It is now read-only.
/
ckeditor.wysiwyg.js
73 lines (61 loc) · 4.15 KB
/
ckeditor.wysiwyg.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* Copyright (c) 2013, Divio AG
* Licensed under BSD
* http://github.com/aldryn/aldryn-boilerplate-bootstrap3
*/
// #############################################################################
// CKEDITOR
/**
* Default CKEDITOR Styles
* Added within src/settings.py CKEDITOR_SETTINGS.stylesSet
*
* @module CKEDITOR
*/
/* global CKEDITOR */
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 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': '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-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' }},
/* 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': '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': 'Blockquote Reverse', 'element': 'blockquote', 'attributes': { 'class': 'blockquote-reverse' }}
]);
/*
* Extend ckeditor default settings
* DOCS: http://docs.ckeditor.com/#!/api/CKEDITOR.dtd
*/
CKEDITOR.dtd.$removeEmpty.span = 0;