2016-04-22 734 views
5

我正在使用summernote,有時候我需要字體的值比字體大小列表中的字體高。這是我目前的代碼:如何在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),但它沒有幫助。有沒有辦法如何設置我自己的自定義字體大小列表?

回答

9

要設置自定義字體大小列表,添加到您的選擇:)選項:

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