You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TinyMCE-6如何设置工具栏默认完全展开?

解决TinyMCE 6工具栏默认展开全部的问题

要让TinyMCE加载时默认显示全部工具栏按钮,无需点击右侧三点展开,只需在配置中添加toolbar_mode: 'wrap'参数即可。

修改后的完整配置示例:

menubar: false,
plugins: ['searchreplace', 'link', 'anchor', 'image', 'table', 'charmap','fullscreen','code', 'preview',
'lists','help','wordcount'],
toolbar: 'cut copy paste pastetext | undo redo | searchreplace | selectall | link unlink anchor | ' +
'image| table | hr| charmap  |fullscreen | code | preview print | ' +
'bold italic underline strikethrough subscript superscript | removeformat |'+
'numlist bullist | outdent indent | blockquote |alignleft aligncenter alignright alignjustify |'+
'blocks fontfamily fontsize | forecolor backcolor|help |',
toolbar_mode: 'wrap' // 添加该行配置

说明:

  • toolbar_mode: 'wrap'会让工具栏在空间不足时自动换行,展示所有按钮,不会触发折叠生成三点溢出按钮。
  • 如果页面容器宽度足够,也可以通过调整编辑器的width参数给工具栏预留足够横向空间,但toolbar_mode: 'wrap'是适配不同屏幕宽度的通用解决方案。

内容的提问来源于stack exchange,提问作者Mathew Stephen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.21 14:57:23