最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - TinyMCE fixed_toolbar_container configuration - Stack Overflow

programmeradmin0浏览0评论

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>

I'm using latest, 4.0.1, version of TinyMCE.

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.

Thanks in advance!

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>

I'm using latest, 4.0.1, version of TinyMCE.

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.

Thanks in advance!

Share Improve this question edited Jul 25, 2013 at 11:07 Thariama 50.9k13 gold badges145 silver badges175 bronze badges asked Jun 27, 2013 at 21:20 MeshMesh 611 silver badge3 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

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.

发布评论

评论列表(0)

  1. 暂无评论