TinyMCE fixed_toolbar_container 配置 [英] TinyMCE fixed_toolbar_container configuration
问题描述
我尝试在 tinymce.init 中使用 fixed_toolbar_container 配置,但它给我留下了纯 html textarea 而不是富文本编辑器.这是我的代码:
I tried using fixed_toolbar_container configuration inside tinymce.init, but it left me with plain html textarea instead of rich text editor. Here's my code:
<html>
<head>
<script src="tinymce\js\tinymce\tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "textarea",
inline: true,
fixed_toolbar_container: "#mytoolbar",
plugins: [
"advlist autolink lists link image charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste"
],
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
});
</script>
</head>
<form method="post" action="somepage">
<div id="mytoolbar" style="width:800; height:80; border : 1px blue solid"></div></BR>
<textarea id="content"></textarea>
</form>
</html>
我使用的是最新的 4.0.1 版 TinyMCE.
I'm using latest, 4.0.1, version of TinyMCE.
有人能告诉我我应该如何将 TinyMCE 工具栏(它附加到文本区域的顶部)分解为一个单独的 DIV/iFrame?
Could someone please tell me how should I disintegrate TinyMCE toolbar (which is attached to the top of the textarea) into a separate DIV/iFrame?
我会感谢一个有效的示例代码.
I'll appreciate a working sample code.
提前致谢!
推荐答案
你同时使用选择器 textarea
和 inline: true
,这是冲突的.删除内联设置,或将选择器更改为您想要编辑的某个 DIV 类名或 ID.
You use the selector textarea
and also inline: true
at the same time, which is conflicting. Either remove the inline setting, or change the selector to some DIV classname or ID that you want editable.
这篇关于TinyMCE fixed_toolbar_container 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!