Skip to content

Conversation

@cmrd-senya
Copy link

@cmrd-senya cmrd-senya commented Sep 5, 2022

Hello!

This is a POC for supporting different builds of Quill with ReactQuill.

My idea is to make a separate module called core. This module doesn't depend on quill module at the runtime. It only requires quill for type checking. core expects that the user will set ReactQuill.Quill value to a Quill compatible class, i.e. something that is able to construct an object compatible with Quill interface. Instead of building instance of Quill with new Quill directly core module builds whatever is set to ReactQuill.Quill with new ReactQuill.Quill(...).

To make my changes backwards compatible I implement index module which is based on core and is setting ReactQuill.Quill to the regular Quill instance at the runtime.

Now, if someone wants to use a different Quill version they can just use core module instead of index and set ReactQuill.Quill for whatever they want to.

My use-case for these changes is that I want to avoid using the regular Quill build, the one from quill/dist/quill.js. I want to use the Quill core version from quill/core or quill/dist/core. In general anything that is compatible with Quill interface can be used with ReactQuill, for example custom builds of Quill.

@cmrd-senya cmrd-senya changed the title Support different versions of Quill Support different builds of Quill Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant