Fix saving class name attributes for divider and custom html blocks

[MAILPOET-2746]
This commit is contained in:
Rostislav Wolny
2020-03-18 09:30:39 +01:00
committed by Veljko V
parent 162b968f09
commit e9c3049576
2 changed files with 15 additions and 2 deletions

View File

@@ -228,7 +228,9 @@ export const blocksToFormBodyFactory = (colorDefinitions, customFields = []) =>
id: 'divider',
type: 'divider',
name: 'Divider',
params: '',
params: {
class_name: block.attributes.className || null,
},
};
case 'mailpoet-form/html':
return {
@@ -239,6 +241,7 @@ export const blocksToFormBodyFactory = (colorDefinitions, customFields = []) =>
params: {
text: block.attributes && block.attributes.content ? block.attributes.content : '',
nl2br: block.attributes && block.attributes.nl2br ? '1' : '0',
class_name: block.attributes.className || null,
},
};
default: