Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

WIP Add infogram processor #174

Open
wants to merge 1 commit into
base: dev-stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/shared/processors/medium/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import tzGallery from './tzGallery';
import dmGallery from './dmGallery';
import myrGallery from './myrGallery';
import myrTiledGallery from './myrTiledGallery';
import infogram from './infogram';
import { textCounter, injectSlot } from './injectSlots';

export default [
Expand All @@ -13,4 +14,5 @@ export default [
dmGallery,
myrGallery,
myrTiledGallery,
infogram,
];
9 changes: 9 additions & 0 deletions src/shared/processors/medium/infogram.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
test: ({ component, props }) =>
component === 'div' &&
props.className.split(' ').includes('infogram-embed'),
process: ({ props: { 'data-id': id, 'data-title': title } }) => ({
component: 'iframe',
props: { src: `https://e.infogram.com/${id}?src=embed`, title },
}),
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some random comment.