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
definitionany—true

field definition

validationany—false

validation in this field

dataany—true

data on this field

modestring—true

mode

contenttypestring—true

contenttype the field in

formdataany—true

whole data

formValidationany—true

whole validation