How can I disable the Quill editor

℡╲_俬逩灬. 提交于 2019-12-07 04:31:54

问题


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?


回答1:


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

basicEditor.editor.enable(false)



回答2:


Use this statement

var quill = new Quill('#editor-container');
quill.enable(false);



回答3:


quill.disable() should do the trick.



来源:https://stackoverflow.com/questions/24817629/how-can-i-disable-the-quill-editor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!