gatsby-plugin-wordpress-parser

2.1.3 • Public • Published

gatsby-plugin-wordpress-parser

Description

Adds custom replacement rules (see Contact Form 7)

How to Use

Wherever you need to display the post content:

import ContentParser from "gatsby-plugin-wordpress-parser";

replace <div dangerouslySetInnerHTML={{ __html: content }} /> with this

<div>
  <ContentParser content={content} />
</div>

How to Extend for Contact Form 7

Use gatsby-plugin-wpcf7

import ContentParser from "gatsby-plugin-wordpress-parser";
import { cf7ParserFunction } from "gatsby-plugin-wpcf7";

replace <div dangerouslySetInnerHTML={{ __html: content }} /> with:

<div>
  <ContentParser content={content} customFn={[cf7ParserFunction]} />
</div>

Package Sidebar

Install

npm i gatsby-plugin-wordpress-parser

Weekly Downloads

0

Version

2.1.3

License

SEE LICENSE IN LICENSE

Unpacked Size

3.7 kB

Total Files

6

Last publish

Collaborators

  • kmediabe