Store columns text and background colors settings
[MAILPOET-2609]
This commit is contained in:
committed by
Pavel Dohnal
parent
c93efabc70
commit
8e71f8d3cc
@@ -106,6 +106,12 @@ const mapBlocks = (blocks, customFields = [], parent = null) => {
|
||||
position: (index + 1).toString(),
|
||||
type: 'columns',
|
||||
body: mapBlocks(block.innerBlocks, customFields, block),
|
||||
params: {
|
||||
text_color: block.attributes.textColor || null,
|
||||
background_color: block.attributes.backgroundColor || null,
|
||||
custom_text_color: block.attributes.customTextColor || null,
|
||||
custom_background_color: block.attributes.customBackgroundColor || null,
|
||||
},
|
||||
};
|
||||
case 'mailpoet-form/email-input':
|
||||
return {
|
||||
|
@@ -72,6 +72,18 @@ const mapColumnBlocks = (data, customFields = []) => {
|
||||
if (has(data.params, 'vertical_alignment')) {
|
||||
mapped.attributes.verticalAlignment = data.params.vertical_alignment;
|
||||
}
|
||||
if (has(data.params, 'text_color')) {
|
||||
mapped.attributes.textColor = data.params.text_color;
|
||||
}
|
||||
if (has(data.params, 'custom_text_color')) {
|
||||
mapped.attributes.customTextColor = data.params.custom_text_color;
|
||||
}
|
||||
if (has(data.params, 'background_color')) {
|
||||
mapped.attributes.backgroundColor = data.params.background_color;
|
||||
}
|
||||
if (has(data.params, 'custom_background_color')) {
|
||||
mapped.attributes.customBackgroundColor = data.params.custom_background_color;
|
||||
}
|
||||
return mapped;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user