【问题标题】:How to set custom fontsize list in summernote?如何在summernote中设置自定义字体大小列表?
【发布时间】:2016-08-15 14:28:30
【问题描述】:

我使用的是summernote,有时我需要比字体大小列表中可用的值更高的字体。这是我当前的代码:

$('#summernote').summernote({
  toolbar: [
    ['style', ['style']],
    ['fontsize', ['fontsize']],
    ['font', ['bold', 'italic', 'underline', 'clear']],
    ['fontname', ['fontname']],
    ['color', ['color']],
    ['para', ['ul', 'ol', 'paragraph']],
    ['height', ['height']],
    ['insert', ['picture', 'hr']],
    ['table', ['table']]
  ],
  height: 585,
  focus: false
});

我尝试输入工具栏字体大小(如 10、20、25、30 之类的数字),但没有帮助。有没有办法如何设置我自己的自定义字体大小列表?

【问题讨论】:

    标签: font-size summernote


    【解决方案1】:

    要设置自定义字体大小列表,请将其添加到您的选项中:) 选项:

    $('#summernote').summernote({
        fontSizes: ['8', '9', '10', '11', '12', '14', '18', '24', '36', '48' , '64', '82', '150']
    });
    

    【讨论】:

      猜你喜欢
      • 2015-01-16
      • 2012-05-06
      • 2017-12-10
      • 2013-01-06
      • 2015-11-21
      • 2016-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多