'How to integrate Quill (rich-text-editor) with react-final-form?

How to integrate Quill (rich-text-editor) with react-final-form?



Solution 1:[1]

Thats it works for me

import { FC } from 'react';
import { Field } from 'react-final-form';
import ReactQuill from 'react-quill';

const FormQuill: FC<{ name: string }> = ({ name }) => (
  <Field name={name}>
    {({ input: { value, ...input } }) => (
      <ReactQuill
        value={value}
        onChange={(newValue, delta, source) => {
          if (source === 'user') {
            input.onChange(newValue);
          }
        }}
      />
    )}
  </Field>
);

export default FormQuill;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Temístocles Schwartz