Skip to content

Commit ea9ea89

Browse files
committed
Merge pull request summernote#1538 from summernote/feature/icon-2
support summernote icons
2 parents 40e5d9e + 0435dae commit ea9ea89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1638
-44
lines changed

Gruntfile.js

+15-2
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,27 @@ module.exports = function (grunt) {
238238
}
239239
},
240240
clean: {
241-
dist: ['dist']
241+
dist: ['dist/**/*']
242242
},
243243
copy: {
244244
dist: {
245245
files: [
246-
{src: 'lang/*', dest: 'dist/'}
246+
{src: 'lang/*', dest: 'dist/'},
247+
{expand: true, cwd: 'src/icons/results/icons/', src: ['**', '!*.html'], dest: 'dist/icons/'},
248+
{src: 'src/icons/results/summernote.css', dest: 'dist/summernote-icon.css'}
247249
]
248250
}
251+
},
252+
webfont: {
253+
icons: {
254+
src: 'src/icons/*.svg',
255+
dest: 'src/icons/results/icons',
256+
destCss: 'src/icons/results/',
257+
options: {
258+
font: 'summernote',
259+
template: 'src/icons/templates/summernote.css'
260+
}
261+
}
249262
}
250263
});
251264

dist/icons/summernote.css

+274
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
/* Generated by grunt-webfont */
2+
/* Based on https://github.com/endtwist/fontcustom/blob/master/lib/fontcustom/templates/fontcustom.css */
3+
4+
5+
@font-face {
6+
font-family:"summernote";
7+
src:url("summernote.eot?44368136daaa019037dc6a99de1bacac");
8+
src:url("summernote.eot?#iefix") format("embedded-opentype"),
9+
url("summernote.woff?44368136daaa019037dc6a99de1bacac") format("woff"),
10+
url("summernote.ttf?44368136daaa019037dc6a99de1bacac") format("truetype");
11+
font-weight:normal;
12+
font-style:normal;
13+
}
14+
15+
16+
/* Bootstrap Overrides */
17+
[class^="note-icon-"]:before,
18+
[class*=" note-icon-"]:before {
19+
display:inline-block;
20+
vertical-align:middle;
21+
line-height:1;
22+
font: normal normal normal 14px summernote;
23+
font-size: inherit;
24+
speak:none;
25+
text-decoration:inherit;
26+
text-transform:none;
27+
text-rendering:auto;
28+
-webkit-font-smoothing:antialiased;
29+
-moz-osx-font-smoothing:grayscale;
30+
}
31+
32+
33+
34+
/* Icons */
35+
36+
37+
.note-icon-align-center:before {
38+
content:"\f101";
39+
}
40+
41+
42+
43+
.note-icon-align-indent:before {
44+
content:"\f102";
45+
}
46+
47+
48+
49+
.note-icon-align-justify:before {
50+
content:"\f103";
51+
}
52+
53+
54+
55+
.note-icon-align-left:before {
56+
content:"\f104";
57+
}
58+
59+
60+
61+
.note-icon-align-outdent:before {
62+
content:"\f105";
63+
}
64+
65+
66+
67+
.note-icon-align-right:before {
68+
content:"\f106";
69+
}
70+
71+
72+
73+
.note-icon-align:before {
74+
content:"\f107";
75+
}
76+
77+
78+
79+
.note-icon-arrows-alt:before {
80+
content:"\f108";
81+
}
82+
83+
84+
85+
.note-icon-bold:before {
86+
content:"\f109";
87+
}
88+
89+
90+
91+
.note-icon-caret:before {
92+
content:"\f10a";
93+
}
94+
95+
96+
97+
.note-icon-chain-broken:before {
98+
content:"\f10b";
99+
}
100+
101+
102+
103+
.note-icon-circle:before {
104+
content:"\f10c";
105+
}
106+
107+
108+
109+
.note-icon-close:before {
110+
content:"\f10d";
111+
}
112+
113+
114+
115+
.note-icon-code:before {
116+
content:"\f10e";
117+
}
118+
119+
120+
121+
.note-icon-eraser:before {
122+
content:"\f10f";
123+
}
124+
125+
126+
127+
.note-icon-font:before {
128+
content:"\f110";
129+
}
130+
131+
132+
133+
.note-icon-frame:before {
134+
content:"\f111";
135+
}
136+
137+
138+
139+
.note-icon-italic:before {
140+
content:"\f112";
141+
}
142+
143+
144+
145+
.note-icon-link:before {
146+
content:"\f113";
147+
}
148+
149+
150+
151+
.note-icon-magic:before {
152+
content:"\f114";
153+
}
154+
155+
156+
157+
.note-icon-menu-check:before {
158+
content:"\f115";
159+
}
160+
161+
162+
163+
.note-icon-minus:before {
164+
content:"\f116";
165+
}
166+
167+
168+
169+
.note-icon-orderedlist:before {
170+
content:"\f117";
171+
}
172+
173+
174+
175+
.note-icon-pencil:before {
176+
content:"\f118";
177+
}
178+
179+
180+
181+
.note-icon-picture:before {
182+
content:"\f119";
183+
}
184+
185+
186+
187+
.note-icon-question:before {
188+
content:"\f11a";
189+
}
190+
191+
192+
193+
.note-icon-redo:before {
194+
content:"\f11b";
195+
}
196+
197+
198+
199+
.note-icon-special-character:before {
200+
content:"\f11c";
201+
}
202+
203+
204+
205+
.note-icon-square:before {
206+
content:"\f11d";
207+
}
208+
209+
210+
211+
.note-icon-strikethrough:before {
212+
content:"\f11e";
213+
}
214+
215+
216+
217+
.note-icon-subscript:before {
218+
content:"\f11f";
219+
}
220+
221+
222+
223+
.note-icon-summernote:before {
224+
content:"\f120";
225+
}
226+
227+
228+
229+
.note-icon-superscript:before {
230+
content:"\f121";
231+
}
232+
233+
234+
235+
.note-icon-table:before {
236+
content:"\f122";
237+
}
238+
239+
240+
241+
.note-icon-text-height:before {
242+
content:"\f123";
243+
}
244+
245+
246+
247+
.note-icon-trash:before {
248+
content:"\f124";
249+
}
250+
251+
252+
253+
.note-icon-underline:before {
254+
content:"\f125";
255+
}
256+
257+
258+
259+
.note-icon-undo:before {
260+
content:"\f126";
261+
}
262+
263+
264+
265+
.note-icon-unorderedlist:before {
266+
content:"\f127";
267+
}
268+
269+
270+
271+
.note-icon-video:before {
272+
content:"\f128";
273+
}
274+

dist/icons/summernote.eot

12.9 KB
Binary file not shown.

dist/icons/summernote.ttf

12.7 KB
Binary file not shown.

dist/icons/summernote.woff

8.14 KB
Binary file not shown.

index.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
66
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" />
7-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css" />
7+
<!--<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css" />-->
88
<link rel="stylesheet" href="../dist/summernote.css">
9+
<link rel="stylesheet" href="../dist/summernote-icon.css">
910
<title>summernote</title>
1011
</head>
1112
<body>
1213
<div class="container">
13-
<h4>Summernote
14+
<h4> <i class="note-icon-summernote"></i> Summernote
1415
<span class="label label-info">Bootstrap v3.3.5</span>
15-
<span class="label label-success">font-awesome v4.3.0</span>
16+
<span class="label label-success">with Summernote Icons</span>
1617
</h4>
1718
<div class="summernote"><p>Hello World</p></div>
1819
</div>

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"grunt-karma": "^0.12.0",
3434
"grunt-recess": "*",
3535
"grunt-saucelabs": "*",
36+
"grunt-webfont": "^1.0.2",
3637
"karma": "^0.13.3",
3738
"karma-chrome-launcher": "^0.2.0",
3839
"karma-coverage": "^0.5.3",

src/icons/align-center.svg

+11
Loading

src/icons/align-indent.svg

+11
Loading

src/icons/align-justify.svg

+11
Loading

src/icons/align-left.svg

+12
Loading

src/icons/align-outdent.svg

+11
Loading

0 commit comments

Comments
 (0)