我在上一个版本(版本 4.0b3)的项目中使用 tinymce 插件,当使用完整模式不起作用且仅隐藏文本区域时。但在基本版本中工作正常。我在 tinymce 页面中使用了示例代码,但仍然无法正常工作。所有补丁也是正确的。
<script type="text/javascript" src="<your installation path>/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 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>
<form method="post" action="somepage">
<textarea name="content" style="width:100%"></textarea>
</form>