Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

font-family option in summernote not working

Tags:

summernote

fontfamily option is not working in summernote I tried

$("#divCalltoactiontitle").summernote({
        toolbar: [

            ['font', ['bold', 'italic', 'underline', 'clear']],
            ['fontsize', ['fontsize']], 
        ],
        fontNames: [
    'Serif', 'Sans', 'Arial', 'Arial Black', 'Courier',
    'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande',
    'Sacramento'
        ],

    } );
like image 947
user3844820 Avatar asked Dec 17 '15 14:12

user3844820


1 Answers

It seems that you missed fontname on your toolbar settings. fontNames options is just setup font items.

toolbar: [
  ['fontname', ['fontname']
]

http://summernote.org/deep-dive/#custom-fontnames

For more about toolbar settings, please refer to default toolbar settings.

toolbar settings: https://github.com/summernote/summernote/blob/develop/src/js/bs3/settings.js#L67

fontNames settings: https://github.com/summernote/summernote/blob/develop/src/js/bs3/settings.js#L112

like image 166
Hacker Wins Avatar answered Oct 01 '22 04:10

Hacker Wins