我遇到了同样的问题,这对我有用:
按照 https://www.tiny.cloud/docs/tinymce/latest/vite-es6-npm/ 的说明进行操作,但更改以下两行:
/* content UI CSS is required */
import contentUiSkinCss from 'tinymce/skins/ui/oxide/content.js';
/* The default content CSS can be changed or replaced with appropriate CSS for the editor content. */
import contentCss from 'tinymce/skins/content/default/content.js';
进入:
/* content UI CSS is required */
import 'tinymce/skins/ui/oxide/content.js';
/* The default content CSS can be changed or replaced with appropriate CSS for the editor content. */
import 'tinymce/skins/content/default/content.js';
并确保将以下两行添加到tinymce初始化中:
skin_url: 'default',
content_css: 'default',