@@ -58,6 +58,7 @@ You can compose a toolbar with pre-shipped buttons.
58
58
* Font Style
59
59
* ` fontname ` : set font family
60
60
* ` fontsize ` : set font size
61
+ * ` fontsizeunit ` : set font size unit
61
62
* ` color ` : set foreground and background color
62
63
* ` forecolor ` : set foreground color
63
64
* ` backcolor ` : set background color
@@ -169,6 +170,15 @@ $('#summernote').summernote({
169
170
});
170
171
{% endhighlight %}
171
172
173
+ ### Custom font size units
174
+ You can set the available font size units with the ` fontSizeUnits ` option.
175
+
176
+ {% highlight javascript %}
177
+ $('#summernote').summernote({
178
+ fontSizeUnits: [ 'px', 'pt']
179
+ });
180
+ {% endhighlight %}
181
+
172
182
### Custom line heights
173
183
You can override the default list and specify a custom one.
174
184
@@ -413,10 +423,18 @@ $('#summernote').summernote('fontName', 'Arial');
413
423
Set font size.
414
424
415
425
{% highlight javascript %}
416
- // @param {Number} font size - unit is px
426
+ // @param {Number} font size - unit is determined by selected font size unit.
417
427
$('#summernote').summernote('fontSize', 20);
418
428
{% endhighlight %}
419
429
430
+ ### fontSizeUnit
431
+ Set font size unit.
432
+
433
+ {% highlight javascript %}
434
+ // @param {String} font size unit - defaults to px.
435
+ $('#summernote').summernote('fontSizeUnit', 'pt');
436
+ {% endhighlight %}
437
+
420
438
### removeFormat
421
439
Clean a style.
422
440
0 commit comments