diff --git a/website/site/content/docs/custom-widgets.md b/website/site/content/docs/custom-widgets.md index 8b066434..91dfe266 100644 --- a/website/site/content/docs/custom-widgets.md +++ b/website/site/content/docs/custom-widgets.md @@ -2,7 +2,6 @@ title: Custom Widgets position: 35 --- - # Custom Widgets The NetlifyCMS exposes an `window.CMS` global object that you can use to register custom widgets, previews, and editor plugins. The available widget extension methods are: @@ -26,11 +25,12 @@ CMS.registerWidget(name, control, \[preview\]) **Params:** -Param | Type | Description ---- | --- | --- -`name` | string | Widget name, allows this widget to be used via the field `widget` property in config -`control` | React.Component \| string | -[`preview`] | React.Component, optional | Renders the widget preview, receives the following props: +| Param | Type | Description | +| ----------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | string | Widget name, allows this widget to be used via the field `widget` property in config | +| `control` | React.Component | string | | +| [`preview`] | React.Component, optional | Renders the widget preview, receives the following props: | + * **field:** The field type that this widget will be used for. * **control:** A React component that renders the editing interface for this field. Two props will be passed: * **value:** The current value for this field. @@ -40,7 +40,7 @@ Param | Type | Description **Example:** ```html - + +