Skip to content

Commit 8ada688

Browse files
committed
Update ContentLink documentation with stripStega details
Clarify that stripStega works with any data type (strings, objects, arrays, primitives) by converting to JSON, removing stega encodings with VERCEL_STEGA_REGEX, and parsing back. Add examples for different data types.
1 parent 2276cf7 commit 8ada688

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/content-link.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ The `true` parameter scrolls to the nearest editable element, useful on long pag
239239

240240
The `<ContentLink />` component accepts the following props:
241241

242-
| Prop | Type | Default | Description |
243-
| ------------------- | ---------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
244-
| `onNavigateTo` | `(path: string) => void` | - | Callback when [Web Previews plugin](https://www.datocms.com/marketplace/plugins/i/datocms-plugin-web-previews) requests navigation to a different page |
245-
| `currentPath` | `string` | - | Current pathname to sync with [Web Previews plugin](https://www.datocms.com/marketplace/plugins/i/datocms-plugin-web-previews) |
246-
| `enableClickToEdit` | `true \| { scrollToNearestTarget: true }` | - | Enable click-to-edit overlays on mount. Pass `true` or an object with options. If undefined, click-to-edit is disabled |
247-
| `stripStega` | `boolean` | - | Whether to strip stega encoding from text nodes after stamping |
248-
| `root` | `React.RefObject<HTMLElement>` | - | Ref to limit scanning to this root element instead of the entire document |
242+
| Prop | Type | Default | Description |
243+
| ------------------- | ----------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
244+
| `onNavigateTo` | `(path: string) => void` | - | Callback when [Web Previews plugin](https://www.datocms.com/marketplace/plugins/i/datocms-plugin-web-previews) requests navigation to a different page |
245+
| `currentPath` | `string` | - | Current pathname to sync with [Web Previews plugin](https://www.datocms.com/marketplace/plugins/i/datocms-plugin-web-previews) |
246+
| `enableClickToEdit` | `true \| { scrollToNearestTarget: true }` | - | Enable click-to-edit overlays on mount. Pass `true` or an object with options. If undefined, click-to-edit is disabled |
247+
| `stripStega` | `boolean` | - | Whether to strip stega encoding from text nodes after stamping |
248+
| `root` | `React.RefObject<HTMLElement>` | - | Ref to limit scanning to this root element instead of the entire document |
249249

250250
## Advanced usage: the `useContentLink` hook
251251

@@ -524,7 +524,7 @@ if (decoded) {
524524

525525
### `stripStega`
526526

527-
Removes stega encoding from any data type (strings, objects, arrays, primitives) by converting to JSON, removing all stega-encoded segments using the global VERCEL_STEGA_REGEX, and parsing back to the original type:
527+
Removes stega encoding from any data type (strings, objects, arrays, primitives):
528528

529529
```typescript
530530
import { stripStega } from 'react-datocms';

0 commit comments

Comments
 (0)