2.1.3 • Published 3 years ago
gatsby-plugin-wordpress-parser v2.1.3
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
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>2.1.3
3 years ago