
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
markup-frame
Advanced tools
A React component to display raw html markup inside an iframe.
Sometimes you need to display html inside an iframe, but not it's not at a URL. Perhaps you got the markup from an API endpoint or generated it yourself. Maybe the markup is from a different domain and you need to be able to manipulate its DOM without cross-origin errors. For all these reasons, you can use MarkupFrame.
import React from 'react';
import ReactDOM from 'react-dom';
import MarkupFrame from 'markup-frame';
function getMarkupFromAPI() {
return '<h1 class="article-title">Hello World!</h1><p>How are you?</h1>';
}
const FrameWrapper = React.createClass( {
onFrameLoad( frameDocument ) {
frameDocument.querySelector( '.article-title' ).innerHTML = 'MarkupFrame is Great!';
},
render() {
return (
<MarkupFrame markup={ getMarkupFromAPI() } onLoad={ this.onFrameLoad } />
);
}
} );
ReactDOM.render(
<FrameWrapper />,
document.getElementById( 'example' )
);

markup: The markup to display in the preview.onClick: (Optional) A function which will be called when any DOM element is clicked. Will be passed the raw event.onLoad: (Optional) A function which will be called when the DOM is loaded. Will be passed a reference to the DOM document object.FAQs
A React component to display raw html markup inside an iframe
We found that markup-frame demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.