fix lists markup
Right now the lists are rendered correctly on github thanks to GFM, but not on https://www.netlifycms.org/docs/architecture/
This commit is contained in:
parent
aa1e75ff19
commit
5bb459c8b1
@ -49,12 +49,14 @@ Components are separated into two main categories: Container components and Pres
|
||||
|
||||
### Entry Editing
|
||||
For either updating an existing entry or creating a new one, the `EntryEditor` is used and the flow is the same:
|
||||
|
||||
* When mounted, the `EntryPage` container component dispatches the `createDraft` action, setting the `entryDraft` state to a blank state (in case of a new entry) or to a copy of the selected entry (in case of an edit).
|
||||
* The `EntryPage` will also render widgets for each field type in the given entry.
|
||||
* Widgets are used for editing entry fields. There are different widgets for different field types, and they are always defined in a pair containing a `control` and a `preview` component. The control component is responsible for presenting the user with the appropriate interface for manipulating the current field value, while the preview component is responsible for displaying the value with the appropriate styling.
|
||||
|
||||
#### Widget components implementation
|
||||
The control component receives one (1) callback as a prop: `onChange`.
|
||||
|
||||
* onChange (required): Should be called when the users changes the current value. It will ultimately end up updating the EntryDraft object in the Redux Store, thus updating the preview component.
|
||||
* onAddAsset & onRemoveAsset (optionals): If the field accepts file uploads for media (images, for example), these callbacks should be invoked with a `AssetProxy` value object. `onAddAsset` will get the current media stored in the Redux state tree while `onRemoveAsset` will remove it. AssetProxy objects are stored in the `Medias` object and referenced in the `EntryDraft` object on the state tree.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user