Image Block¶
image_block is a non-void block element node that displays one inline image on its own line.
Usage and Children¶
- Its
childrencontain one inline image, with text leaves before and after it for cursor placement. These leaves can be empty; consumers must not require animage_blockto contain only one child. - The editor converts an
image_blockcontaining multiple images into a paragraph.
Data Structure¶
image_block uses the common element fields. Image source and link settings belong to its child Image.
Image Block Example¶
{
"id": "image-block-id",
"type": "image_block",
"children": [
{
"id": "before-image-id",
"text": ""
},
{
"id": "image-id",
"type": "image",
"data": {
"src": "/image.png"
},
"children": [
{
"id": "image-placeholder-id",
"text": ""
}
]
},
{
"id": "after-image-id",
"text": ""
}
]
}