Dmi*_*t3F 3 javascript summernote
我正在使用最新版本的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'
});
Run Code Online (Sandbox Code Playgroud)
一个可能的解决方案是使用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');
Run Code Online (Sandbox Code Playgroud)
谢谢
| 归档时间: |
|
| 查看次数: |
8316 次 |
| 最近记录: |