vue-quill-editor icon indicating copy to clipboard operation
vue-quill-editor copied to clipboard

option: readOnly doesn't work

Open cfabregas opened this issue 6 years ago • 9 comments

version: "vue": "2.3.3", "vue-quill-editor": "^3.0.6"

option: { readOnly: true, theme: 'bubble' } but i can still edit, sorry to bother, have a nice day!

cfabregas avatar May 11 '18 14:05 cfabregas

readOnly: true not working for me as well. To enable/disable the editor, you have to bind the disabled to the component like this:

<quill-editor
      v-model='content'
      :options='editorOption'
      :disabled='disabled'
></quill-editor>

Then you can toggle the disabled in your data property.

ruwang avatar May 16 '18 21:05 ruwang

It should be the problem of the source,I have the same problem,disabled is a good point

BH-NOTHING avatar May 18 '18 08:05 BH-NOTHING

I have the same question and disable doesn't work either . So I want to ask you how do you show the content generated by the editor.

divawth avatar Sep 11 '18 02:09 divawth

use [email protected] plz.

JaneHu1109 avatar Sep 13 '18 08:09 JaneHu1109

I set disabled,and it work!

crazyaguai avatar Sep 18 '18 09:09 crazyaguai

The readOnly options isn't working but :disabled='disabled' is working as expected. Thanks!

arivera12 avatar Nov 24 '18 23:11 arivera12

readOnly: true not working for me as well. To enable/disable the editor, you have to bind the disabled to the component like this:

<quill-editor
      v-model='content'
      :options='editorOption'
      :disabled='disabled'
></quill-editor>

Then you can toggle the disabled in your data property.

This is a good idea and now I success to make it disabled.

yesw6a avatar Dec 10 '18 02:12 yesw6a

yeah,the readonly property is not work,but :disabled='true' is worked

amanzyw avatar Jul 31 '19 09:07 amanzyw

<quill-editor
      v-model='content'
      :options='editorOption'
      :disabled='disabled'
></quill-editor>

Then you can toggle the disabled in your data property.

With multiple editors on one page this does not work quite well. What did the trick for me was to initially disable all editors with :disabled='disabled' and then listen on the @focus-event.

onEditorFocus(quill) {
  if (!quill.isEnabled()) {
    quill.enable()
    quill.focus()
  }
}

prebm avatar Nov 06 '20 10:11 prebm