Skip to content

Commit 4e6bf7b

Browse files
committed
add styleTags to the deep dive documentation
ref summernote/summernote#2946
1 parent 5fc2a83 commit 4e6bf7b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

01-deep-dive.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,33 @@ $('#summernote').summernote({
152152
});
153153
{% endhighlight %}
154154

155+
### Custom styles
156+
157+
You can set your own selection of styles with the `styleTags` option.
158+
159+
{% highlight javascript %}
160+
$('#summernote').summernote({
161+
styleTags: [
162+
'p',
163+
{ title: 'Blockquote', tag: 'blockquote', className: 'blockquote', value: 'blockquote' },
164+
'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'
165+
],
166+
});
167+
{% endhighlight %}
168+
169+
The tags can be specified just by tag name (as with `p` or `pre` or `h1`-`h6` above). It is also
170+
possible to customize the style in more defaul by providing an object looking like:
171+
172+
{% highlight javascript %}
173+
{
174+
tag : 'tag name ',
175+
title : 'dropdown item title',
176+
style : 'dropdown item style',
177+
className : 'applyed element class name and dropdown item className',
178+
value : 'Value to apply when clicked'
179+
}
180+
{% endhighlight %}
181+
155182
### Custom fontNames
156183
You can define fontNames items with the `fontNames` option.
157184

0 commit comments

Comments
 (0)