我正在使用具有现代主题的 TinyMCE 4。我想在编辑器底部设置工具栏的位置(就像状态栏的位置一样)
这是代码,但它不起作用:
tinymce.init({
selector: 'textarea#editor',
menubar: false,
statusbar: false,
resize: false,
height: textEditHeight,
theme_modern_toolbar_location : "bottom",
});
最佳答案
我知道这是一篇旧帖子,但我想我会分享我的解决方案。
我为“init”事件添加了一个事件处理程序,然后使用 jQuery 更改工具栏和编辑器 div 的顺序。
tinyMCE.init({
...
setup: function (ed) {
ed.on('init', function (evt) {
var toolbar = $(evt.target.editorContainer)
.find('>.mce-container-body >.mce-toolbar-grp');
var editor = $(evt.target.editorContainer)
.find('>.mce-container-body >.mce-edit-area');
// switch the order of the elements
toolbar.detach().insertAfter(editor);
});
}
关于javascript - Tinymce:编辑器底部的工具栏位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19346818/