TinyMCE不会在Firefox上显示,适用于IE9

时间:2013-10-03 18:38:46

标签: html css internet-explorer firefox tinymce

我正在使用TinyMCE版本4.0.6,它在IE9中工作正常但在Firefox中它没有显示任何内容,甚至连textarea都没有显示。< / p>

我的代码是这样的:

<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;
}

1 个答案:

答案 0 :(得分: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"
        ],