How can I disable the Quill editor

2019-05-03 13:48发布

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?

标签: quill
3条回答
成全新的幸福
2楼-- · 2019-05-03 14:33

quill.disable() should do the trick

查看更多
不美不萌又怎样
3楼-- · 2019-05-03 14:36

This isn't currently documented but you can do this:

basicEditor.editor.enable(false)
查看更多
成全新的幸福
4楼-- · 2019-05-03 14:40

Use this statement

var quill = new Quill('#editor-container');
quill.enable(false);
查看更多
登录 后发表回答