I am using ngx-editor for creating wysiwyg editor for my MEAN stack application. Everything is working fine but I want to set height for this editor. I have tried to set height in the css file for the component like
.ngx-editor[_ngcontent-c4] .ngx-editor-textarea[_ngcontent-c4] {
height: 300px !important;
}
but still its not working.
Even I tried to set height from the component.html file like this
<div class="form-group">
<label for="desc">Description</label>
<app-ngx-editor style="height: 300px" [style]="{'min-height':'320px'}" formControlName="desc" [placeholder]="'Enter text here...'" [spellcheck]="true" [(ngModel)]="htmlContent"></app-ngx-editor>
</div>
but still its not working.
Can someone tell me how to set the height for the editor? I have gone through its docs but not got any help so far. So can someone tell me how to set its height? Any help and suggestions will be really appreciable
You can simply set the height of the editor using height
and minHeight
properties.
<app-ngx-editor height="100px" minHeight="50px"></app-ngx-editor>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With