Summernote造型不起作用

时间:2018-06-13 10:53:39

标签: bootstrap-4 summernote

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

在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'
  }
});

如果我重置我的代码并使用官方演示中的代码

,也会发生同样的情况

1 个答案:

答案 0 :(得分: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/

相关问题