Skip to main content

Content

Block editor

The BlockEditor component is the main component of the editor. It is responsible for rendering the content editor.

Loading...

Props

PropDescription

contentField

string

Field name of string field in entities referenced by field prop.

Required

field

string

The name of the column in Contember schema where to store data.

Required

label

ReactNode

The label for the field.

Required

sortableBy

undefined | string

The name of the column in Contember schema that is used to sort the options.

Required

referencesField

undefined | string | SugaredRelativeEntityList

Field name of the references.

referenceDiscriminationField

undefined | string | SugaredRelativeSingleField

Field name of the reference discrimination.

inlineButtons

undefined | ToolbarButtonSpec[] | ToolbarButtonSpec[][]

Buttons to be displayed in the inline toolbar.

blockButtons

undefined | BlockHoveringToolbarConfig[] | BlockHoveringToolbarConfig[][] |

Buttons to be displayed in the block toolbar.

augmentEditor

undefined | ((baseEditor: BaseEditor) => BaseEditor)

Function to be called when the editor is created.

Block repeater

The BlockRepeater component is a simple way to repeat blocks of content. Use Block for wrapping fields.

Loading...

Props

PropDescription

field

string

The name of the column in Contember schema where to store data.

Required

label

ReactNode

The label for the field.

Required

discriminationField

string | SugaredRelativeSingleField

Required

sortableBy

undefined | string

The name of the column in Contember schema that is used to sort the options.

Required

addButtonText

undefined | string