summernote - Summernote 中的字体系列选项不起作用

标签 summernote

fontfamily 选项在 summernote 中不起作用
我试过

$("#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'
        ],

    } );

最佳答案

看来你错过了fontname在您的工具栏设置上。 fontNames选项只是设置字体项目。

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

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

有关工具栏设置的更多信息,请参阅默认工具栏设置。

工具栏设置:
https://github.com/summernote/summernote/blob/develop/src/js/bs3/settings.js#L67

字体名称设置:
https://github.com/summernote/summernote/blob/develop/src/js/bs3/settings.js#L112

关于summernote - Summernote 中的字体系列选项不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34336535/

相关文章:

css - 使用 Google Material Design 的 Summernote

javascript - summernote airMode 在 div 中无法正常工作

c# - summernote 上传图片到s3 (asp.net)

javascript - 在 summernote 中设置最大长度

javascript - 如何在summernote中添加属性名称点击编辑

javascript - 关注 contenteditable div/Summernote 中的下一段

javascript - Summernote 自定义对话框和按钮

javascript - Summernote 始终在新标签页中打开链接

php - summernote 在从 Mysql DB 检索后显示 html 代码

summernote - 如何限制summernote中文本区域的字数