Add support for image block link

[MAILPOET-2750]
This commit is contained in:
Rostislav Wolny
2020-04-02 15:20:27 +02:00
committed by Veljko V
parent 7a604fa10e
commit 63d6d463cb
8 changed files with 68 additions and 2 deletions

View File

@@ -215,6 +215,10 @@ export const imageBlock = {
caption: 'Caption',
linkDestination: 'none',
link: 'http://example.com',
href: 'http://example.com/link',
linkClass: 'link-class',
rel: 'linkRel',
linkTarget: '_blank',
id: 123,
sizeSlug: 'medium',
width: 100,

View File

@@ -441,6 +441,10 @@ describe('Blocks to Form Body', () => {
expect(input.params.caption).to.be.equal('Caption');
expect(input.params.link_destination).to.be.equal('none');
expect(input.params.link).to.be.equal('http://example.com');
expect(input.params.href).to.be.equal('http://example.com/link');
expect(input.params.link_class).to.be.equal('link-class');
expect(input.params.rel).to.be.equal('linkRel');
expect(input.params.link_target).to.be.equal('_blank');
expect(input.params.id).to.be.equal(123);
expect(input.params.size_slug).to.be.equal('medium');
expect(input.params.width).to.be.equal(100);

View File

@@ -629,6 +629,11 @@ describe('Form Body To Blocks', () => {
expect(block.attributes.title).to.equal('Title');
expect(block.attributes.caption).to.equal('Caption');
expect(block.attributes.linkDestination).to.equal('none');
expect(block.attributes.link).to.equal('http://example.com');
expect(block.attributes.href).to.be.equal('http://example.com/link');
expect(block.attributes.linkClass).to.be.equal('link-class');
expect(block.attributes.rel).to.be.equal('linkRel');
expect(block.attributes.linkTarget).to.be.equal('_blank');
expect(block.attributes.id).to.equal(123);
expect(block.attributes.sizeSlug).to.equal('medium');
expect(block.attributes.width).to.equal(100);

View File

@@ -269,6 +269,10 @@ export const image = {
caption: 'Caption',
link_destination: 'none',
link: 'http://example.com',
href: 'http://example.com/link',
link_class: 'link-class',
rel: 'linkRel',
link_target: '_blank',
id: 123,
size_slug: 'medium',
width: 100,