0

我使用的是TinyMCE4.0.6 版本,它可以正常工作,IE9Firefox它什么也没有显示,甚至连textarea它连接的也没有。

我的代码是这样的:

<head>
    <link href="~/Styles/CSS/Layout.css" rel="stylesheet" />
    <script src="~/Scripts/Addons/TinyMCE/tinymce.min.js"></script>
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>

    <script type="text/javascript">
    tinymce.init({
        selector: "textarea",
        theme: "modern",
        plugins: [
            "advlist autolink lists link image charmap print preview hr anchor pagebreak",
            "searchreplace wordcount visualblocks visualchars code fullscreen",
            "insertdatetime media nonbreaking save table contextmenu directionality",
            "emoticons template paste textcolor moxiemanager"
        ],
        toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
        toolbar2: "print preview media | forecolor backcolor emoticons",
        image_advtab: true,
        templates: [
            { title: 'Test template 1', content: 'Test 1' },
            { title: 'Test template 2', content: 'Test 2' }
        ]
    });
    </script>
</head>
<body>
    <form action="" method="post">
         <textarea name="content" ></textarea>
    </form>
</body>

CSS:

textarea {
    width:100%;
    min-width:290px;
    height:100px;
}
4

1 回答 1

1

事实证明,这里的问题在于名为 MoxieManager 的 TinyMCE 插件,该插件未正确加载并导致跨浏览器出现问题。当它被删除时,它开始在所有浏览器上运行。

这是 OP 设置的 jsfiddle 复制品:http: //jsfiddle.net/4VZZU

这是修改后的plugins数组:

plugins: [
            "advlist autolink lists link image charmap print preview hr anchor pagebreak",
            "searchreplace wordcount visualblocks visualchars code fullscreen",
            "insertdatetime media nonbreaking save table contextmenu directionality",
            "emoticons template paste textcolor"
        ],
于 2013-10-03T19:28:01.697 回答