Save heading background color in form editor
[MAILPOET-2976]
This commit is contained in:
committed by
Veljko V
parent
101f23b926
commit
6a669ad620
@ -166,6 +166,11 @@ export const blocksToFormBodyFactory = (colorDefinitions, fontSizeDefinitions, c
|
||||
block.attributes.textColor,
|
||||
block.attributes.customTextColor
|
||||
),
|
||||
background_color: mapColorSlugToValue(
|
||||
colorDefinitions,
|
||||
block.attributes.backgroundColor,
|
||||
block.attributes.customBackgroundColor
|
||||
),
|
||||
anchor: block.attributes.anchor || null,
|
||||
class_name: block.attributes.className || null,
|
||||
},
|
||||
|
@ -399,6 +399,7 @@ describe('Blocks to Form Body', () => {
|
||||
level: 3,
|
||||
align: 'center',
|
||||
customTextColor: '#123',
|
||||
customBackgroundColor: '#321',
|
||||
anchor: 'anchor',
|
||||
className: 'class',
|
||||
},
|
||||
@ -408,6 +409,7 @@ describe('Blocks to Form Body', () => {
|
||||
expect(input.params.level).to.be.equal(3);
|
||||
expect(input.params.align).to.be.equal('center');
|
||||
expect(input.params.text_color).to.be.equal('#123');
|
||||
expect(input.params.background_color).to.be.equal('#321');
|
||||
expect(input.params.anchor).to.be.equal('anchor');
|
||||
expect(input.params.class_name).to.be.equal('class');
|
||||
});
|
||||
|
Reference in New Issue
Block a user