1.官网:https://summernote.org/deep-dive/#custom-fontnames
2.Summernote允许您自定义工具栏:
$('#summernote').summernote({
toolbar: [
['edit',['undo','redo']],//编辑
['headline', ['style']],//大字标题
['style', ['bold', 'italic', 'underline', 'superscript', 'subscript', 'strikethrough', 'clear']],//样式
['fontface', ['fontname','color','fontsize']],//字体
['alignment', ['ul', 'ol', 'paragraph', 'lineheight']],//对齐方式
['height', ['height']],//行高(自定义行高时一定不要忘记写这个)
['table', ['table']],//表单
['insert', ['link','picture','hr']],//插入链接,图片,下划线
['view', ['fullscreen', 'codeview']]//全屏,代码视图
],
});
如图效果:
3.自定义fontNames:
$('#summernote').summernote({
fontNames: ['Arial', 'Arial Black', 'Comic Sans MS', 'Courier New']
});
4.自定义lineheight:
$('#summernote').summernote({
lineHeights: ['0.5','1.0', '1.2', '1.4', '1.5', '1.6', '1.8', '2.0', '9.0'],
});