我的TinyMCE-6有以下工具栏选项:
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 |' +
'',在页面中呈现时,默认情况下不会显示所有工具栏。

我必须点击右边的3个点来展开整个工具栏。

是否可以在加载tinyMCE ?时默认展开所有工具栏?
发布于 2022-08-23 14:13:41
您可以使用添加到TinyMCE配置中的API调用来做您想做的事情。
要使用的TinyMCE命令是ToggleToolbarDrawer。您可以使用TinyMCE init中的安装函数调用此API:
tinymce.init({
...
setup: function (editor) {
editor.on('init', function (e) {
editor.execCommand('ToggleToolbarDrawer')
});
}
...
});下面是一个有用的示例:https://fiddle.tiny.cloud/skiaab
https://stackoverflow.com/questions/73455349
复制相似问题