我很困惑我如何错误地使用 TinyMCE。首先我从http://www.tinymce.com/download/download.php下载它,我选择 TinyMCE 4.0.3。完成下载后,我有文件夹 tinymce_4.0.3,其中包含 tinymce_4.0.3\tinymce\js\tinymce 之类的文件夹,然后我将此文件夹 (js/tinymce) 复制到我的网站文件夹 mywebsite 中。
Atlast 我用这样的代码创建 test.php 文件(我从http://www.tinymce.com/tryit/full.php编写它)
<html>
<head>
<script type="text/javascript" src="js/tinymce/tinymce.min.js"></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 method="post" action="somepage">
<textarea name="content" style="width:100%"></textarea>
</form>
</body>
</html>
但是当我打开 url localhost/mysite/test.php 时什么都没有显示。有谁知道我出现了什么问题?
非常感谢。