Skip to content

API > @blocksuite/blocks > ParagraphBlockSchema

Variable: ParagraphBlockSchema ​

const ParagraphBlockSchema: object

Type declaration ​

model ​

model: {flavour: "affine:paragraph"; props: PropsGetter< {text: Text; type: ParagraphType;} >; role: "root" | "hub" | "content";} & {parent: string[]; role: "content"; version: number;}

model.flavour ​

flavour: "affine:paragraph"

model.props ​

props: PropsGetter< {text: Text; type: ParagraphType;} >

model.role ​

role: "root" | "hub" | "content"

model.parent ​

parent: string[]

model.role ​

role: "content" = 'content'

model.version ​

version: number = 1


onUpgrade ​

optional onUpgrade: function

Parameters ​

ParameterType
dataobject
data.textText
data.typeParagraphType
previousVersionnumber
latestVersionnumber

Returns ​

void


transformer ​

optional transformer: function

Returns ​

BaseBlockTransformer< {text: Text; type: ParagraphType;} >


version ​

version: number

Defined In ​

packages/blocks/src/paragraph-block/paragraph-model.ts:13