0
我在我的網站上使用TinyMCE。通過使用它,管理員可以編輯網站的靜態頁面的數據。一切工作都很完美,但我希望知道,我們可以通過這種方式來設置所需的最少字數。我的代碼是在tenyMCE中設置單詞的極限
<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>
希望得到一些幫助