
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
blocks-html-renderer
Advanced tools
Render the content of Strapi's Blocks rich text editor as HTML in your frontend.
Render the content of Strapi's Blocks rich text editor as HTML in your frontend.
Install the HTML-Blocks renderer and its peer dependencies:
yarn add blocks-html-renderer
npm install blocks-html-renderer
After fetching your Strapi content, you can use the renderBlock function to render the data from a blocks attribute. Pass the array of blocks coming from your Strapi API to the content
prop:
import { renderBlock, type Node } from 'blocks-html-renderer';
// Content should come from your Strapi API
const content: Node[] = [
{
type: 'paragraph',
children: [{ type: 'text', text: 'A simple paragraph' }],
},
];
renderBlock(content);
//<p>A simple paragraph</p>
FAQs
Render the content of Strapi's Blocks rich text editor as HTML in your frontend.
The npm package blocks-html-renderer receives a total of 0 weekly downloads. As such, blocks-html-renderer popularity was classified as not popular.
We found that blocks-html-renderer 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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.