How to open links in a new tab
The Medium embed supports opening links in new tabs by adding a line to the embed
code snippet. The feature name is "openNewTab" and it must be set to true.
See the example below:
<div id="fm-medium-embed"></div> <script src="//data.feedmirror.com/embed.js"></script> <script> var fmSettings = { feedURL: # YOUR FEED URL HERE , integration: 'medium-embed', linkOutText: 'Read more', linkToMediumProfileText: 'Subscribe on Medium', postsCount: 3, openNewTab: true, element: 'fm-medium-embed' }; feedmirror.initialize(fmSettings); </script>
If openNewTab is not present, or if it is set to false, links will open in the current tab.
A couple things to note:
- each line in the code snippet options must to end with a comma, except for the last line.
- This feature isn't enabled by default because it is recommended to let website visitors choose if they want a link to open in a new tab, rather opening the new tab for them.