Vue 使用 tinymce 控制台报 Resource interpreted as Stylesheet but ...

yhb_flydream

Vue 使用 tinymce 控制台报 Resource interpreted as Stylesheet but transferred with MIME type text/html 导致编辑器不显示

设置 skin_url 指定 css 路径:

{
  ...
  language: 'zh_CN',
  skin_url: '/src/assets/tinymce/skins/ui/oxide',
  ...
}

但控制台提示:

Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/src/assets/tinymce/skins/ui/oxide/skin.min.css".
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/src/assets/tinymce/skins/ui/oxide/content.min.css".

导致编辑器区域为空白,显示不出来。

tinymce-react Issues Skin false does not prevent loading of skins #53 发现解决办法:

  • 手动引入 css

export default 上面引入:

import 'tinymce/skins/ui/oxide/skin.min.css'
import 'tinymce/skins/ui/oxide/content.inline.min.css'

然后设置初始参数:

{
  ...
  language: 'zh_CN',
  content_css: false,
  // skin_url: '/src/assets/tinymce/skins/ui/oxide',
  ...
}
阅读 862

I want something just like this!

4 声望
0 粉丝
0 条评论
你知道吗?

I want something just like this!

4 声望
0 粉丝
宣传栏