Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 onquill
module at the runtime. It only requiresquill
for type checking.core
expects that the user will setReactQuill.Quill
value to aQuill
compatible class, i.e. something that is able to construct an object compatible with Quill interface. Instead of building instance of Quill withnew Quill
directlycore
module builds whatever is set toReactQuill.Quill
withnew ReactQuill.Quill(...)
.To make my changes backwards compatible I implement
index
module which is based oncore
and is settingReactQuill.Quill
to the regularQuill
instance at the runtime.Now, if someone wants to use a different Quill version they can just use
core
module instead ofindex
and setReactQuill.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 fromquill/core
orquill/dist/core
. In general anything that is compatible withQuill
interface can be used withReactQuill
, for example custom builds of Quill.