Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Editor Module. ReferenceError: document is not defined. #8817 #14324

Closed

Conversation

nejat-njonjo
Copy link
Contributor

@nejat-njonjo nejat-njonjo commented Dec 11, 2023

Defect Fixes #8817

This PR is enhancing changes made on PR #14232. During SSR build this issue #8817 still occurs.

So it seems the issue comes from importing quill on the top level, which somehow automatically initializes the instance of Quill.

import Quill from 'quill'

So on this update, I have removed the import from the top level to dynamically import quill when it's in browser mode.

I also introduced afterNextRender because render callbacks never run during server-side rendering or build-time pre-rendering.

Copy link

vercel bot commented Dec 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2023 4:52pm

@nejat-njonjo nejat-njonjo deleted the fix/ssr-compatible branch December 11, 2023 16:57
@nejat-njonjo nejat-njonjo restored the fix/ssr-compatible branch December 11, 2023 16:58
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.

EditorModule doesn't support SSR
1 participant