How to use the react-quill.Quill.sources function in react-quill

To help you get started, we’ve selected a few react-quill examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github freeCodeCamp / pantry-for-good / client / modules / page / components / PageEditor.js View on Github external
handleEditorChange = editor => (value, _, source) => {
    if (this.resizeModule && this.resizeModule.img) {
      this.resizeModule.onUpdate()
    }

    this.setState({
      page: {
        ...this.state.page,
        subject: editor === editorTypes.SUBJECT ? value : this.state.page.subject,
        body: editor === editorTypes.BODY ? value : this.state.page.body
      }
    })

    if (source === Quill.sources.USER && !this.props.dirty) {
      this.props.setDirty(true)
    }
  }

react-quill

The Quill rich-text editor as a React component.

MIT
Latest version published 2 years ago

Package Health Score

64 / 100
Full package analysis