-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: use Contentful.EntryFields.RichText #106
feat: use Contentful.EntryFields.RichText #106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AndrewLeedham, thanks again :)
I just have a little comment.
@marcolink it seems that This is occurring when using: https://github.com/contentful/rich-text/tree/master/packages/rich-text-react-renderer So I am wondering which of the following is the best course of action:
|
Hi @AndrewLeedham, If the only incompatibility is the |
This playground link illustrates the issue.
That would require using a union instead of an enum, which I think would be worse IMO (also a fairly big breaking change). Given |
Hey @AndrewLeedham, I'll discuss it next week, hopefully, I can post an update on it next week 🤞 |
Hi team - bumping an old issue here (sorry!) to see if there was a resolution to this discussion. I've been using If I use the types as generated, I get the following TypeScript error:
I tried manually changing the type on rich text fields to import { Document } from "@contentful/rich-text-types";
// ...
documentToReactComponents(inputField as Document, options); I'm sure I'm missing something simple here, and would love some help! |
@mbifulco @marcolink updated this PR for the latest code based changes 👍 |
Thanks @AndrewLeedham, |
🎉 This PR is included in version 2.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thank you! |
fixes: #10
Replaces
CFRichTextTypes.Block | CFRichTextTypes.Inline
withContentful.EntryFields.RichText
,