Unable to access Editor instance with dynamically imported react-quill in NextJS
See original GitHub issueI’m using react-quill in a NextJS app. I’m looking to extend a part of the app where I want to force users to use the Quill instance with a specific formatting option enabled by default (list). To achieve this, I believe I need access to the Quill Editor instance.
However, when attempting to use a ref, I’m unable to call the getEditor method on the ref. The only method available is retry
.
I’ve made a CodeSandbox: https://codesandbox.io/s/nextjs-dynamic-react-quill-ref-example-sxm64 Check the browser console to see what the ref object is.
Expected behavior:
I would expect the ref to contain a getEditor
method
Actual behavior:
The ref only contains a retry
method
Version: 2.0.0-beta.2
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:6
Top Results From Across the Web
Unable to access Editor instance in dynamically imported ...
Unable to access Editor instance in dynamically imported react-quill in NextJS.
Read more >How to access ReactQuill Ref when using dynamic import in ...
I'm using NextJS for its server-side rendering capabilities and am using ReactQuill as my rich-text editor. To get around ReactQuill's tie to ...
Read more >ReactQuill with NextJS - DEV Community
Couldn't find any but I found a way to get ReactQuill working. Import dynamic. import dynamic from 'next/dynamic'.
Read more >react-hydration-error - Next.js
An example of this is using window in a component's rendering. ... is only executed in the browser and is executed during hydration...
Read more >Infinite Loading React-Quill With Nextjs Dynamic Import
Unable to access Editor instance with dynamically imported reactquill in NextJS #642. Closed. sanderfish opened this issue on Aug 4.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
When
next/dynamic
wraps the component, it doesn’t seem forwardingref
to the internal component. If I wrapped ReactQuill component withref
renamed toforwardedRef
, it seemed working.https://codesandbox.io/s/nextjs-dynamic-react-quill-ref-example-forked-gyhz3
have you found a solution for this. I am also experiencing this issue as well.