Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable the Quill editor

Tags:

quill

I have a a template which displays rich text data. When the user clicks edit I turn the template into an editable Quill editor like so:

  'click #editNote': (e, t) ->
    note = t.find '.container'
    console.log note
    basicEditor = new Quill(note)

Then once the user clicks save I want to be able to disable the Quill editor. How can I do this?

like image 466
Nearpoint Avatar asked Jul 18 '14 05:07

Nearpoint


People also ask

How do I remove the Quill editor?

Show activity on this post. quill. disable() should do the trick. Save this answer.

How do I turn off react Quill editor?

in React Quill 1.3. 5, you can add the readOnly prop as true. It will disable your editor like input tag when disabled. Save this answer.

What is Quill editor?

Quill is a free, open source WYSIWYG editor built for the modern web. With its modular architecture and expressive API, it is completely customizable to fit any need.


3 Answers

Use this statement

var quill = new Quill('#editor-container');
quill.enable(false);
like image 143
Nikhil Kumar Avatar answered Sep 29 '22 06:09

Nikhil Kumar


If you are using ngx-quill, use this code:

@ViewChild('quill') quill: QuillEditorComponent;

this.quill.setDisabledState(true);

Work for me

like image 23
Rodrigo Quintas Avatar answered Sep 29 '22 06:09

Rodrigo Quintas


quill.disable() should do the trick.

like image 20
Shivanshu Goyal Avatar answered Sep 29 '22 05:09

Shivanshu Goyal