react-quill icon indicating copy to clipboard operation
react-quill copied to clipboard

Update quill dependency to v2

Open william-gooch opened this issue 4 years ago • 4 comments

A similar PR to #507 but for the latest version of react-quill, with no mixin.

Quill v2, while still being in development, has support for features such as tables and increased support for newer versions of Safari. While this might not be merged in until Quill v2 releases properly, at the moment it's useful to have it in some special cases.

william-gooch avatar May 10 '21 09:05 william-gooch

It looks like the API changes are small enough that we could potentially allow either version of Quill with some minor refactoring

alexkrolick avatar Aug 18 '21 17:08 alexkrolick

@alexkrolick we bundle Quill, so shipping two versions is not straightforward.

Quill is currently in -dev, and I am not sure about how much the API is gonna change. There's no documentation for it (that I am aware of) so forcing it on users as a default seems premature.

But I'd be ok adding support for it in either react-quill v1 and v2—with the user overriding the dependency manually via webpack.

Are you aware of any issue preventing release of v2 so far?

zenoamaro avatar Aug 18 '21 17:08 zenoamaro

Screen Shot 2021-08-18 at 4 07 25 PM

But I'd be ok adding support for it in either react-quill v1 and v2—with the user overriding the dependency manually via webpack.

Yep, I was thinking bundling Quill v1 but handling v2 if it is installed via a package.json override. Quill.version appears to be set so we can use that to switch. The only trouble is DeltaStatic was moved to a different package (quill-delta) and ~Quill doesn't re-export it, so we'd need to do a synchronous require in order to not break the API~ EDIT: https://github.com/quilljs/quill/blob/develop/core/quill.js#L446-L453 Quill.imports has a reference to it, and list ~quill-delta and [email protected] in optionalDependencies.~

Looking at the issues, I don't see anything specific to our (react-quill)'s v2 beta, so I'd say it's ok to release as stable now and then do a 2.1.0 release later with the support for quill v2. There is some risk the v2 version eventually breaks react-quill in a larger way that would either another major version that drops v1, or a more complex workaround strategy.

alexkrolick avatar Aug 18 '21 23:08 alexkrolick

Are you still working on V2?

dzienisz avatar May 10 '23 23:05 dzienisz