我正在使用最新版本的 summernote 库。我如何设置默认字体大小和字体? 我正在尝试这样,但它不起作用:
$('.text-editor').summernote({
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'superscript', 'subscript', 'strikethrough', 'clear']],
['fontname', ['fontname']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview']]
],
fontsize: '16'
});
最佳答案
一个可能的解决方案是使用 jQuery 将字体大小样式直接应用到编辑器 div
$('.active-textcontainer').summernote({
toolbar: [
['style', ['bold', 'italic', 'underline']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']]
],
height:150
});
$('.note-editable').css('font-size','18px');
更多.. How to set font-size in summernote?
谢谢
关于javascript - Summernote 设置默认字体大小和字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44944372/