Edit page

Field types

Field types are component rending field in view(including inline) or edit mode. It's possible to have your own implemention of a field type.

Customize your field type

//Put below when you start the app.
//register an image fieldtype component
FieldRegister.registerComponent( 'image', Image );
//register a customize image component in article's cover_image(identifier)
FieldRegister.register( 'article/cover_image', CoverImage )

Implementation

const CustomField = (props:FieldtypeProps)=>{
//render in mode(edit/view/inline)
}

Below is FieldtypeProps properties:

Prop nameTypeDefaultRequiredDescription
definitionanytrue

field definition

validationanyfalse

validation in this field

dataanytrue

data on this field

modestringtrue

mode

contenttypestringtrue

contenttype the field in

formdataanytrue

whole data

formValidationanytrue

whole validation