This plugin adds an html
argument to each rich text field in the GraphQL schema.
When a client requests this field with html
set to true
, the Markdown content of
this field will be rendered to HTML before being returned.
- v4.x.x
npm install strapi-graphql-render-markdown-serverside
or
yarn add strapi-graphql-render-markdown-serverside
Add the following to your config/plugins.js
or config/plugins.ts
file:
'strapi-graphql-render-markdown-serverside': {
config: {
sanitize: {
// Additional sanitize-html config
},
markdown: {
// Additional markdown-it config
}
}
},