我是tinymce的新手,并且使用angularJS编辑器。我正在使用tinymce库4.3.13 使用以下HTML和angularJS代码生成tinymce编辑器。在UI中渲染编辑器时,高度变得非常小(75px),它不会在tinymceOptions对象中设置指定的高度。试过很多解决方案,但无法提出解决方案。非常感谢任何帮助。
<textarea class="form-control" ui-tinymce="tinymceOptions" rows="16" required></textarea>
$scope.tinymceOptions = {
plugins: [
'autoresize 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 colorpicker textpattern imagetools codesample'
],
autoresize_bottom_margin : 5,
menubar:false,
statusbar: false,
toolbar: 'undo redo cut copy paste pastetext alignleft aligncenter alignright alignjustify bullist numlist outdent indent bold italic underline strikethrough formats removeformat fontselect fontsizeselect forecolor backcolor link hr',
height: 400,
width: 1200,
theme: 'modern',
};
答案 0 :(得分:0)
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "autoresize",
selector: '#editor',
selector: 'textarea', // change this value according to your HTML
autoresize_min_height: 100,
autoresize_max_height: 1000,
autoresize_bottom_margin: 0,
allow_conditional_comments: true
});