【发布时间】:2013-10-03 18:38:46
【问题描述】:
我使用的是TinyMCE 4.0.6 版,它在IE9 中运行良好,但在Firefox 中什么也没有显示,甚至连它所连接的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;
}
【问题讨论】:
-
相关,但不是问题的答案:您可能不应该使用
~来引用网站上的文件。使用 html 文件所在的相对路径以获得最佳效果。 -
另外,您的 javascript 控制台中是否出现任何错误,或者没有错误并且只是不显示?
-
完全没有错误。它只是不会在 FF 中显示
-
我对您在 chrome 和 firefox 中工作的代码感到困惑。为了完成这项工作,我唯一需要做的就是删除“moxiemanager”,这会导致错误:jsfiddle.net/4VZZU
-
太棒了,很高兴它成功了!我会将其添加为答案,以便在其他人检查此问题时将其标记为已解决。
标签: html css internet-explorer firefox tinymce