我使用以下内容:
<textarea
data-ui-tinymce="tinymceOptions"
data-ng-disabled="modal.action=='delete'"
data-ng-model="modal.formData.text"
id="inputText"
rows="20"
required></textarea>
Run Code Online (Sandbox Code Playgroud)
当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'}
Run Code Online (Sandbox Code Playgroud)
]
Sol*_*uiD 17
来自javascript
tinymce.init({
selector: 'textarea',
height: 200
});
Run Code Online (Sandbox Code Playgroud)
或者来自html
<textarea style="height: 200px;">
Run Code Online (Sandbox Code Playgroud)
你应该在CSS中设置容器对象的高度:
#inputText {
height : 10000000px;
}
Run Code Online (Sandbox Code Playgroud)