The preview component shown in the editor
preview: (props: PreviewProps<ObjectField<Schema>> & {The schema for the props that the preview component, toolbar and rendered component will receive
schema: Schema;The label to show in the insert menu and chrome around the block if chromeless is false
label: string;An icon to show in the toolbar for this component block. Component blocks with toolbarIcon
are shown in the toolbar directly instead of the insert menu
This will be true when validate has returned false and the user has attempted to close the form or when the form is open and they attempt to save the item
forceValidation: boolean;If undefined is returned, the field will generally not be written, except in array fields where it will be stored as null
serialize(value: ParsedValue): { };Define the number of columns each field should span. The grid layout supports 12 possible columns.
@example — [6, 6] - "one row, equal columns"
@example — [12, 8, 4] - "one field in the first row, two fields in the second row"
@deprecated — fields.markdoc
has superseded this field. fields.mdx
is also available if you prefer MDX.
@deprecated — emptyDocument
has been replaced with the emptyContent
field
This function will only be used when fields.file
is used in a field like fields.markdoc
/fields.mdx
.
When used outside of editor fields, this function will not be used. Instead only the extension of the uploaded file is used and the start of the filename is based on the field key.
This function will only be used when fields.image
is used in a field like fields.markdoc
/fields.mdx
.
When used outside of editor fields, this function will not be used. Instead only the extension of the uploaded file is used and the start of the filename is based on the field key.
export declare namespace mdx.inline {
type Field = AssetsFormField<EditorState, EditorState, string>;
}
export declare namespace markdoc.inline {
type Field = AssetsFormField<EditorState, EditorState, {
node: MarkdocNode;
}>;
}
@default — process.env.KEYSTATIC_GITHUB_CLIENT_ID
clientId?: string;@default — process.env.KEYSTATIC_GITHUB_CLIENT_SECRET
clientSecret?: string;@default — process.env.KEYSTATIC_SECRET
secret?: string;@deprecated — Experimental
export function cloudImage(args: {