Implement adjustable line-height

[MAILPOET-1450]
This commit is contained in:
Jan Jakeš
2019-02-19 11:51:43 +01:00
committed by M. Shull
parent 7d032df7ea
commit 35d39a6ac9
8 changed files with 51 additions and 4 deletions

View File

@@ -197,6 +197,14 @@ Module.SidebarStylesView = Marionette.View.extend({
'change #mailpoet_a_font_underline': function (event) {
this.model.set('link.textDecoration', (event.target.checked) ? event.target.value : 'none');
},
'change #mailpoet_text_line_height': function (event) {
this.model.set('text.lineHeight', event.target.value);
},
'change #mailpoet_heading_line_height': function (event) {
this.model.set('h1.lineHeight', event.target.value);
this.model.set('h2.lineHeight', event.target.value);
this.model.set('h3.lineHeight', event.target.value);
},
'change #mailpoet_newsletter_background_color': _.partial(this.changeColorField, 'wrapper.backgroundColor'),
'change #mailpoet_background_color': _.partial(this.changeColorField, 'body.backgroundColor'),
};

View File

@@ -11,21 +11,25 @@ Module.StylesModel = SuperModel.extend({
fontColor: '#000000',
fontFamily: 'Arial',
fontSize: '16px',
lineHeight: '1.6',
},
h1: {
fontColor: '#111111',
fontFamily: 'Arial',
fontSize: '40px',
lineHeight: '1.6',
},
h2: {
fontColor: '#222222',
fontFamily: 'Tahoma',
fontSize: '32px',
lineHeight: '1.6',
},
h3: {
fontColor: '#333333',
fontFamily: 'Verdana',
fontSize: '24px',
lineHeight: '1.6',
},
link: {
fontColor: '#21759B',