Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Changing options.readOnly doesn't enable/disable quill #60

@damianaiamad

Description

@damianaiamad

The problem is here:

 ngOnChanges(changes: SimpleChanges) {
    if (changes['readOnly'] && this.quillEditor) {
      this.quillEditor.enable(!changes['readOnly'].currentValue);
    }
  }

This solution works for me:

  ngOnChanges(changes: SimpleChanges) {
    if (!changes.options || changes.options.firstChange || !this.quillEditor)
      return

    this.quillEditor.enable(!changes.options.currentValue.readOnly);
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions