You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-3
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,9 @@ choice.
15
15
npm install @charlietango/react-umbraco
16
16
```
17
17
18
-
###`<UmbracoRichText>`
18
+
## `<UmbracoRichText>`
19
19
20
-
[](https://stackblitz.com/github/charlie-tango/react-umbraco/tree/main/examples/UmbracoRichText?file=src/RichText.tsx)
20
+
[](https://stackblitz.com/github/charlie-tango/react-umbraco/tree/main?file=examples/UmbracoRichText/src/RichText.tsx)
21
21
22
22
Takes the rich text property from the Umbraco Content Delivery API and renders
23
23
it with React.
@@ -28,6 +28,10 @@ it with React.
28
28
-`renderBlock`: Render a specific block type.
29
29
-`renderNode`: Overwrite the default rendering of a node. Return `undefined` to
30
30
render the default node. Return `null` to skip rendering the node.
31
+
-`htmlAttributes`: Default attributes to set on the defined HTML elements.
32
+
These will be used, unless the element already has the attribute set. The only
33
+
exception is the `className` attribute, which will be merged with the default
34
+
value.
31
35
32
36
When passing the `renderBlock` and `renderNode` props, consider making them
33
37
static functions (move them outside the consuming component) to avoid
0 commit comments