Add loading image blocks from server

[MAILPOET-2750]
This commit is contained in:
Rostislav Wolny
2020-04-01 15:34:49 +02:00
committed by Veljko V
parent 3616f55df9
commit 072804a412
3 changed files with 55 additions and 0 deletions

View File

@@ -274,6 +274,25 @@ export const formBodyToBlocksFactory = (
},
name: 'core/paragraph',
};
case 'image':
return {
...mapped,
name: 'core/image',
attributes: {
className: item.params?.class_name || '',
align: item.params?.align,
url: item.params?.url,
alt: item.params?.alt,
title: item.params?.title,
caption: item.params?.caption,
linkDestination: item.params?.link_destination,
link: item.params?.link,
id: item.params?.id,
sizeSlug: item.params?.size_slug,
width: item.params?.width,
height: item.params?.height,
},
};
case 'first_name':
return {
...mapped,