docs: make widget docs editable (#1782)

* make widget docs editable

* update widget doc frontmatter keys

* improve docs preview

* fix formatting

* fix preview

* add prism highlighting for previews

* fix formatting

* restore cms branch
This commit is contained in:
Shawn Erquhart
2018-10-01 20:00:57 -04:00
committed by GitHub
parent c261163eab
commit 6e453b3f08
25 changed files with 143 additions and 162 deletions

View File

@ -1,6 +1,6 @@
---
title: boolean
label: "Boolean"
target: boolean
---
The boolean widget translates a toggle switch input to a true/false value.

View File

@ -1,6 +1,6 @@
---
title: date
label: "Date"
target: date
---
The date widget translates a date picker input to a date string. For saving date and time together, use the datetime widget.

View File

@ -1,6 +1,6 @@
---
title: datetime
label: "DateTime"
target: datetime
---
The datetime widget translates a datetime picker to a datetime string. For saving the date only, use the date widget.

View File

@ -1,6 +1,6 @@
---
label: "File"
target: file
title: file
---
The file widget allows editors to upload a file or select an existing one from the media library. The path to the file will be saved to the field as a string.

View File

@ -1,6 +1,6 @@
---
label: "Hidden"
target: hidden
title: hidden
---
Hidden widgets do not display in the UI. In folder collections that allow users to create new items, you will often want to set a default for hidden fields, so they will be set without requiring an input.

View File

@ -1,6 +1,6 @@
---
label: "Image"
target: image
title: image
---
The image widget allows editors to upload an image or select an existing one from the media library. The path to the image file will be saved to the field as a string.

View File

@ -1,6 +1,6 @@
---
label: "List"
target: list
title: list
---
The list widget allows you to create a repeatable item in the UI which saves as a list of widget values. map a user-provided string with a comma delimiter into a list. You can choose any widget as a child of a list widget—even other lists.

View File

@ -1,6 +1,6 @@
---
label: "Markdown"
target: markdown
title: markdown
---
The markdown widget provides a full fledged text editor - which is based on [slate](https://github.com/ianstormtaylor/slate) - that allows users to format text with features such as headings and blockquotes. Users are also allowed to write in markdown by simply flipping a switch.

View File

@ -1,6 +1,6 @@
---
label: "Number"
target: number
title: number
---
The number widget uses an HTML number input, saving the value as a string, integer, or floating point number.

View File

@ -1,6 +1,6 @@
---
label: "Object"
target: object
title: object
---
The object widget allows you to group multiple widgets together, nested under a single field. You can choose any widget as a child of an object widget—even other objects.

View File

@ -1,6 +1,6 @@
---
label: "Relation"
target: relation
title: relation
---
The relation widget allows you to reference items from another collection. It provides a search input with a list of entries from the collection you're referencing, and the list automatically updates with matched entries based on what you've typed.

View File

@ -1,6 +1,6 @@
---
label: "Select"
target: select
title: select
---
The select widget allows you to pick a single string value from a dropdown menu.

View File

@ -1,6 +1,6 @@
---
label: "String"
target: string
title: string
---
The string widget translates a basic text input to a string value. For larger textarea inputs, use the text widget.

View File

@ -1,6 +1,6 @@
---
label: "Text"
target: text
title: text
---
The text widget takes a multiline text field and saves it as a string. For shorter text inputs, use the string widget.