首页 > 解决方案 > 使用 suneditor toolbarContainer 属性时,为什么工具栏布局混乱,图标很大?

问题描述

为 suneditor 使用自定义工具栏容器时,布局混乱。

<div id='someContainer' />

...

    <SunEditor
       setOptions={{
         toolbarContainer : '#someContainer'
       }}
    />

标签: reactjssuneditor

解决方案


工具栏 css 假定它位于类名为“sun-editor”的容器中。因此,请确保自定义容器包含“sun-editor”类名。

<div id='someContainer' class='sun-editor' />

推荐阅读