Add data mappers for custom html block
[MAILPOET-2462]
This commit is contained in:
committed by
Pavel Dohnal
parent
5d5bcd6ab0
commit
d3bc831f69
@@ -83,6 +83,17 @@ export default (blocks) => {
|
||||
static: '0',
|
||||
params: '',
|
||||
};
|
||||
case 'mailpoet-form/custom-html':
|
||||
return {
|
||||
...mapped,
|
||||
id: 'html',
|
||||
type: 'html',
|
||||
name: 'Custom text or HTML',
|
||||
static: '0',
|
||||
params: {
|
||||
text: block.attributes && block.attributes.content ? block.attributes.content : '',
|
||||
},
|
||||
};
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@@ -70,6 +70,15 @@ export default (data) => {
|
||||
name: 'mailpoet-form/divider',
|
||||
clientId: `divider_${index}`,
|
||||
};
|
||||
case 'html':
|
||||
return {
|
||||
...mapped,
|
||||
name: 'mailpoet-form/custom-html',
|
||||
clientId: `custom_html_${index}`,
|
||||
attributes: {
|
||||
content: item.params && item.params.text ? item.params.text : '',
|
||||
},
|
||||
};
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user