【问题标题】:Summernote styling not workingSummernote 样式不起作用
【发布时间】:2018-11-22 22:15:33
【问题描述】:

我做了一个小提琴来暴露我在桌面上遇到的同样问题。

在summernote编辑器中,应用字体大小和字体系列有效,但我无法将字体设置为粗体、斜体、删除线、上标...

我的小提琴:http://jsfiddle.net/djibe89/by9n8azm/

感谢您的帮助

$('#my-summernote').summernote({
  minHeight: 200,
  placeholder: 'Write here ...',
  focus: false,
  airMode: false,
  fontNames: ['Roboto', 'Calibri', 'Times New Roman', 'Arial'],
  fontNamesIgnoreCheck: ['Roboto', 'Calibri'],
  dialogsInBody: true,
  dialogsFade: true,
  disableDragAndDrop: false,
  toolbar: [
    // [groupName, [list of button]]
    ['para', ['style', 'ul', 'ol', 'paragraph']],
    ['fontsize', ['fontsize']],
    ['style', ['bold', 'italic', 'underline', 'clear']],
    ['font', ['strikethrough', 'superscript', 'subscript']],
    ['height', ['height']],
    ['misc', ['undo', 'redo', 'print', 'help', 'fullscreen']]
  ],
  popover: {
    air: [
      ['color', ['color']],
      ['font', ['bold', 'underline', 'clear']]
    ]
  },
  print: {
    //'stylesheetUrl': 'url_of_stylesheet_for_printing'
  }
});

如果我重置代码并使用官方演示中的代码,也会发生同样的情况

【问题讨论】:

    标签: bootstrap-4 summernote


    【解决方案1】:

    刚刚根据文档 (https://summernote.org/getting-started/#for-bootstrap-4) 添加了以下文件。请检查。

    <link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote-bs4.css" rel="stylesheet">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote-bs4.js"></script>
    

    http://jsfiddle.net/by9n8azm/106/

    【讨论】:

    猜你喜欢
    • 2017-07-12
    • 2022-10-07
    • 2014-06-19
    • 2016-05-23
    • 2016-08-15
    • 2014-10-20
    • 2014-12-22
    • 2014-06-05
    • 2018-11-01
    相关资源
    最近更新 更多