首页 > 解决方案 > Summernote v0.8.15 图标未加载

问题描述

我遇到了一个问题,其中 Summernote 图标无法正确加载。我该怎么做?

在此处输入图像描述

标签: summernote

解决方案


要在 Summernote 8.15 中正确加载图标,您需要将其包含在您的 css/scss 文件中

ex. css/fonts.scss
/* summernote 8.15 need to include it font-face*/

@font-face {
  font-family: "summernote";
  font-style: normal;
  font-weight: 400;
  font-display: auto;
  src: url('/fonts/font/summernote.eot');
  src: url('/fonts/font/summernote.eot?#iefix') format("embedded-opentype"), 
       url('/fonts/font/summernote.woff2') format("woff2"), 
       url('/fonts/font/summernote.woff') format("woff"), 
      url('/fonts/font/summernote.ttf') format("truetype");}

然后在你的资产中,你需要复制summernote 8.15的字体文件夹

assets/
- css/
  --fonts.scss
-fonts/
  --font/
    ---summernote.eot
    ---summernote.woff2
    ---summernote.woff
    ---summernote.ttf

请参阅 Summernote 文档https://summernote.org/


推荐阅读