Skip to content

Commit e72887d

Browse files
authored
Merge pull request #53 from jadomag/master
Add documentation for font size unit options
2 parents 9b8787b + 592c643 commit e72887d

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

01-deep-dive.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ You can compose a toolbar with pre-shipped buttons.
5858
* Font Style
5959
* `fontname`: set font family
6060
* `fontsize`: set font size
61+
* `fontsizeunit`: set font size unit
6162
* `color`: set foreground and background color
6263
* `forecolor`: set foreground color
6364
* `backcolor`: set background color
@@ -169,6 +170,15 @@ $('#summernote').summernote({
169170
});
170171
{% endhighlight %}
171172

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+
172182
### Custom line heights
173183
You can override the default list and specify a custom one.
174184

@@ -413,10 +423,18 @@ $('#summernote').summernote('fontName', 'Arial');
413423
Set font size.
414424

415425
{% highlight javascript %}
416-
// @param {Number} font size - unit is px
426+
// @param {Number} font size - unit is determined by selected font size unit.
417427
$('#summernote').summernote('fontSize', 20);
418428
{% endhighlight %}
419429

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+
420438
### removeFormat
421439
Clean a style.
422440

0 commit comments

Comments
 (0)