Skip to content

defineContainer

defineContainer<TSchema>(config): ContainerDefinition

Defined in: packages/editor/src/renderers/renderer.types.ts:103

Define a container.

With a schema type parameter, scope is constrained to valid JSONPath container scopes, and field is constrained to the array field names on the scope’s terminal type:

defineContainer<typeof schema>({
scope: '$..table.row.cell',
field: 'content',
render: ({children}) => <td>{children}</td>,
})

Without a schema type parameter, accepts any string.

TSchema extends SchemaDefinition

SchemaContainerConfig<TSchema>

ContainerDefinition

defineContainer(config): ContainerDefinition

Defined in: packages/editor/src/renderers/renderer.types.ts:109

ContainerDefinition

ContainerDefinition