Dan Brown

Added WYSIWYG editor callouts

1 var mceOptions = module.exports = { 1 var mceOptions = module.exports = {
2 selector: '#html-editor', 2 selector: '#html-editor',
3 content_css: [ 3 content_css: [
4 - '/css/styles.css' 4 + '/css/styles.css',
5 + '/libs/material-design-iconic-font/css/material-design-iconic-font.min.css'
5 ], 6 ],
6 body_class: 'page-content', 7 body_class: 'page-content',
7 relative_urls: false, 8 relative_urls: false,
...@@ -19,11 +20,18 @@ var mceOptions = module.exports = { ...@@ -19,11 +20,18 @@ var mceOptions = module.exports = {
19 {title: "Header 1", format: "h1"}, 20 {title: "Header 1", format: "h1"},
20 {title: "Header 2", format: "h2"}, 21 {title: "Header 2", format: "h2"},
21 {title: "Header 3", format: "h3"}, 22 {title: "Header 3", format: "h3"},
22 - {title: "Paragraph", format: "p"}, 23 + {title: "Paragraph", format: "p", exact: true, classes: ''},
23 {title: "Blockquote", format: "blockquote"}, 24 {title: "Blockquote", format: "blockquote"},
24 {title: "Code Block", icon: "code", format: "pre"}, 25 {title: "Code Block", icon: "code", format: "pre"},
25 - {title: "Inline Code", icon: "code", inline: "code"} 26 + {title: "Inline Code", icon: "code", inline: "code"},
27 + {title: "Callouts", items: [
28 + {title: "Success", block: 'p', exact: true, attributes : {'class' : 'callout success'}},
29 + {title: "Info", block: 'p', exact: true, attributes : {'class' : 'callout info'}},
30 + {title: "Warning", block: 'p', exact: true, attributes : {'class' : 'callout warning'}},
31 + {title: "Danger", block: 'p', exact: true, attributes : {'class' : 'callout danger'}}
32 + ]}
26 ], 33 ],
34 + style_formats_merge: false,
27 formats: { 35 formats: {
28 alignleft: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'align-left'}, 36 alignleft: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'align-left'},
29 aligncenter: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'align-center'}, 37 aligncenter: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'align-center'},
......
...@@ -125,3 +125,51 @@ ...@@ -125,3 +125,51 @@
125 margin-right: $-xl; 125 margin-right: $-xl;
126 } 126 }
127 } 127 }
128 +
129 +
130 +/**
131 + * Callouts
132 + */
133 +
134 +.callout {
135 + border-left: 3px solid #BBB;
136 + background-color: #EEE;
137 + padding: $-s;
138 + &:before {
139 + font-family: 'Material-Design-Iconic-Font';
140 + padding-right: $-s;
141 + display: inline-block;
142 + }
143 + &.success {
144 + border-left-color: $positive;
145 + background-color: lighten($positive, 45%);
146 + color: darken($positive, 16%);
147 + }
148 + &.success:before {
149 + content: '\f269';
150 + }
151 + &.danger {
152 + border-left-color: $negative;
153 + background-color: lighten($negative, 34%);
154 + color: darken($negative, 20%);
155 + }
156 + &.danger:before {
157 + content: '\f1f2';
158 + }
159 + &.info {
160 + border-left-color: $info;
161 + background-color: lighten($info, 50%);
162 + color: darken($info, 16%);
163 + }
164 + &.info:before {
165 + content: '\f1f8';
166 + }
167 + &.warning {
168 + border-left-color: $warning;
169 + background-color: lighten($warning, 36%);
170 + color: darken($warning, 16%);
171 + }
172 + &.warning:before {
173 + content: '\f1f1';
174 + }
175 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -38,6 +38,7 @@ $primary-dark: #0288D1; ...@@ -38,6 +38,7 @@ $primary-dark: #0288D1;
38 $secondary: #e27b41; 38 $secondary: #e27b41;
39 $positive: #52A256; 39 $positive: #52A256;
40 $negative: #E84F4F; 40 $negative: #E84F4F;
41 +$info: $primary;
41 $warning: $secondary; 42 $warning: $secondary;
42 $primary-faded: rgba(21, 101, 192, 0.15); 43 $primary-faded: rgba(21, 101, 192, 0.15);
43 44
......