How to set default height - height is not working inline= 'true'

511 views Asked by At

am using your tiny product in my application. While implementing I have one issue please help us. The problem is we set inline : true and height : '500'. We tried to set default height is 500. But the height is not affect. Always shown the editor is small. We need to set default height.

Note: If inline : false. In html added. We don't need 'iframe'.

We looking for your support and help Inline : true --> code enter image description here Expected Output: enter image description here I have attached code :

[https://codepen.io/venkat5299/pen/eYzmMaz][3]

Thanks.

1

There are 1 answers

1
Michael Fromin On

As you have surmised, the height configuration option only impacts the classic mode of TinyMCE (iframe). If you wanted to set the height of an editor using inline editing you would need to use CSS to set the height of the element (div in your example) that TinyMCE will use for the inline editor. For example:

<div id="editor" style="min-height:300px;">...</div>

When TinyMCE takes over that element the element is still being used (unlike classic mode where an iframe is used in place of the textarea. As such setting CSS on the div will get you the effect you want. I would note that you likely want to use min-height (not height) as this will allow the div to grow if the content extends beyond the original height you provide.