feat: pass markdown for hint message on field (#5584)

This commit is contained in:
Gabriel Kirkley
2021-07-07 03:51:41 -07:00
committed by GitHub
parent b362c56389
commit 610421ea67
4 changed files with 94 additions and 8 deletions

View File

@ -10,13 +10,12 @@ Widgets are specified as collection fields in the Netlify CMS `config.yml` file.
To see working examples of all of the built-in widgets, try making a 'Kitchen Sink' collection item on the [CMS demo site](https://cms-demo.netlify.com). (No login required: click the login button and the CMS will open.) You can refer to the demo [configuration code](https://github.com/netlify/netlify-cms/blob/master/dev-test/config.yml) to see how each field was configured.
## Common widget options
The following options are available on all fields:
- `required`: specify as `false` to make a field optional; defaults to `true`
- `hint`: optionally add helper text directly below a widget. Useful for including instructions.
- `hint`: optionally add helper text directly below a widget. Useful for including instructions. Accepts markdown for bold, italic, and links.
- `pattern`: add field validation by specifying a list with a [regex pattern](https://regexr.com/) and an error message; more extensive validation can be achieved with [custom widgets](../custom-widgets/#advanced-field-validation)
- **Example:**
```yaml