我在我的网站上使用TinyMCE。通过使用它,管理员可以编辑网站的静态页面的数据。一切都工作得很好,但我想知道我们可以通过哪种方式设置所需的最小字数。我的代码是
<script type="text/javascript">
tinymce.init({
selector: ".editor",
theme: "modern",
plugins: [
"code advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"save table contextmenu directionality emoticons template paste textcolor"
],
content_css: "css/content.css",
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l ink image | print preview media fullpage | forecolor backcolor emoticons",
style_formats: [
{title: 'Bold text', inline: 'b'},
{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
{title: 'Example 1', inline: 'span', classes: 'example1'},
{title: 'Example 2', inline: 'span', classes: 'example2'},
{title: 'Table styles'},
{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
]
});
</script>
<form action="#" method="POST" role="form">
<div class="form-group">
<label for="body"> Body: </label>
<textarea class="form-control editor" name="pagedata" id="body" rows="8" placeholder="body">
</textarea>
</div>
<button type="submit" class="btn btn-default"> Save </button>
</form>
会感激一些帮助
答案 0 :(得分:0)