KillerCodeMonkey/ng-quill

Set height of the editor

ozairsajid opened this issue ยท 11 comments

@KillerCodeMonkey Can we please have a similar feature like what you added in ngx-quill?
KillerCodeMonkey/ngx-quill#58 (comment)

I used on-editor-created() and used the editor reference to set the height.

@ozairsajid can you please provide an example? Thanks

One template file having multiple instances of ng-quill. We had to dynamically set different height for each of the instance.

thanks for the reply, can you share the code that sets the height? I have only one editor.

Template:

<ng-quill-editor ng-model="panel.value"
                             width="100%"
                             on-editor-created="quillHeight(editor)"
                <ng-quill-toolbar></ng-quill-toolbar>
            </ng-quill-editor>

JS

$scope.quillHeight = function (editor) {
                                    editor.container.style.height = '500px';
                    };

@ozairsajid

Setting height is working but i'm trying to set placeholder on-editor-created as yours but it's not working
editor.options.placeholder = 'newplaceholder';

Screen Shot 2563-03-04 at 11 11 57

on-editor-created() is not updating my placeholder .. Do u know how to fix that

Screen Shot 2563-03-04 at 11 33 40

Placeholder is'nt updating

We are setting the placeholder as an attribute in the template and not through the editor option.

<ng-quill-editor ng-model="modelObject"
                             read-only="::property.isReadOnly || checkReadOnly(property,panel)"
                             ng-required="{{::property.isRequired}}"
                             theme="{{panel.skin || moduleInfo.skin}}"
                             width="100%"
                             placeholder="{{::property.description}}"
                             on-editor-created="quillHeight(editor, property, panel)">
                <ng-quill-toolbar></ng-quill-toolbar>
</ng-quill-editor>

@deshario aaaand this ticket is not even about the placeholder... and everything else is answered in another issue you created... if you want an answer just search for an existing and correct ticket or create A SINGLE new one.

@ozairsajid but thanks for sharing your answer!