我正在使用以下内容:
<textarea
data-ui-tinymce="tinymceOptions"
data-ng-disabled="modal.action=='delete'"
data-ng-model="modal.formData.text"
id="inputText"
rows="20"
required></textarea>
当tinymce出现时高度只有几厘米。如何在默认值首次出现时更改它的高度?
这是我正在使用的选项列表:
selector: "textarea",
plugins: [
"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"table contextmenu template textcolor paste fullpage textcolor"
],
toolbar1: "bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect fontselect fontsizeselect",
toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | code | inserttime preview | forecolor backcolor",
toolbar3: "table | hr removeformat | subscript superscript | charmap | print fullscreen | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",
menubar: false,
toolbar_items_size: 'small',
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
]
最佳答案
来自 javascript
tinymce.init({
selector: 'textarea',
height: 200
});
或来自 html
<textarea style="height: 200px;">
关于html - 如何设置 tinymce 文本区域的高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17811417/