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

Update README requrie-custome-rendering #112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Text documents.
- [Rich Text Concept](https://www.contentful.com/developers/docs/concepts/rich-text/)
- [Getting Started](https://www.contentful.com/developers/docs/tutorials/general/getting-started-with-rich-text-field-type/)
- [Migrate content to Rich Text](https://www.contentful.com/developers/docs/tutorials/general/migrate-to-rich-text/)
- [Rich Text and Gatsby](https://www.contentful.com/developers/docs/tutorials/general/rich-text-and-gatsby/)

## Get involved

Expand Down
3 changes: 2 additions & 1 deletion packages/rich-text-html-renderer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ documentToHtmlString(document, options);
// -> <custom-paragraph><custom-bold>Hello</custom-bold><u> world!</u></custom-paragraph>
```

Last, but not least, you can pass a custom rendering component for an embedded entry:
Last, but not least, if you use `EMBEDDED_ASSET` or `EMBEDDED_ASSET` you must pass a custom rendering component for render them:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Last, but not least, if you use `EMBEDDED_ASSET` or `EMBEDDED_ASSET` you must pass a custom rendering component for render them:
Last, but not least, if you use `EMBEDDED_ENTRY` or `EMBEDDED_ASSET` you must pass a custom rendering component for render them:

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for fixing, my mistake


```javascript
import { BLOCKS } from '@contentful/rich-text-types';
Expand Down Expand Up @@ -143,6 +143,7 @@ documentToHtmlString(document, options);
The `renderNode` keys should be one of the following `BLOCKS` and `INLINES` properties as defined in [`@contentful/rich-text-types`](https://www.npmjs.com/package/@contentful/rich-text-types):

- `BLOCKS`

- `DOCUMENT`
- `PARAGRAPH`
- `HEADING_1`
Expand Down
4 changes: 2 additions & 2 deletions packages/rich-text-react-renderer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const document = {
nodeType: 'text',
value: 'Hello world!',
marks: [],
data: {}
data: {},
},
],
},
Expand Down Expand Up @@ -116,7 +116,7 @@ documentToReactComponents(document, options);
// -> <p class="align-center"><p class="bold">Hello</p><u> world?</u></p>
```

Last, but not least, you can pass a custom rendering component for an embedded entry:
Last, but not least, if you use `EMBEDDED_ASSET` or `EMBEDDED_ASSET` you must pass a custom rendering component for render them:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Last, but not least, if you use `EMBEDDED_ASSET` or `EMBEDDED_ASSET` you must pass a custom rendering component for render them:
Last, but not least, if you use `EMBEDDED_ENTRY` or `EMBEDDED_ASSET` you must pass a custom rendering component for render them:


```javascript
import { BLOCKS } from '@contentful/rich-text-types';
Expand Down