Customize by Initializing various options and modules.
Summernote allows you to customise the toolbar.
$('#summernote').summernote({
toolbar: [
// [groupName, [list of button]]
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
This is a toolbar with font style only.
Toolbar for font style...
You can compose a toolbar with pre-shipped buttons.
picture
: open image dialoglink
: open link dialogvideo
: open video dialogtable
: insert a tablehr
: insert a horizontal rulefontname
: set font familyfontsize
: set font sizecolor
: set foreground and background colorforecolor
: set foreground colorbackcolor
: set background colorbold
: toggle font weightitalic
: toggle italicunderline
: toggle underlinestrikethrough
: toggle strikethroughsuperscript
: toggle superscriptsubscript
: toggle subscriptclear
: clear font stylestyle
: format selected blockol
: toggle ordered listul
: toggle unordered listparagraph
: dropdown for paragraph alignheight
: set line heightfullscreen
: toggle fullscreen editing modecodeview
: toggle wysiwyg and html editing modeundo
: undoredo
: redohelp
: open help dialogThe following settings are default options for toolbar buttons.
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['fontname', ['fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video']],
['view', ['fullscreen', 'codeview', 'help']],
],
Air-mode has its own popover, not toolbar. You can customize it with popover.air
option.
$('#summernote').summernote({
popover: {
air: [
['color', ['color']],
['font', ['bold', 'underline', 'clear']]
]
}
});
You can also setup buttons of the other popovers in the same way. The below s