使用 React 自定义 tinymce

Customising tinymce with React

我用的是tinymce的react组件。文档非常简短地介绍了如何将 tinymce 与 React 一起使用并对其进行自定义。我可以包含该组件,但我想对其进行自定义(使用 css)。任何帮助表示赞赏。如果无法自定义它,有人可以建议替代方案或我自己实现它的方法。

有一个名为 content_css 的选项,可让您根据周围环境设置样式。您可以通过导航到此 link 阅读更多信息。请注意,您可以使用外部 CSS 文件,也可以使用内联 CSS.

来自docs,

It is usually desirable that TinyMCE’s editable area has the same styling as the surrounding content. Consistent styling is achieved with the content_css option, which enables you to extend external CSS into the editable area.

Ps。我假设您使用的是最新版本的 TinyMCE (v5)