strapi-graphql-render-markdown-serverside
v1.1.0
Published
Adds an attribute to each rich text field in the GraphQL schema to render HTML to Markdown on the server.
Readme
Strapi GraphQL plugin to render markdown content server side
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.
Supported Strapi versions
- v4.x.x
Installation
npm install strapi-graphql-render-markdown-serversideor
yarn add strapi-graphql-render-markdown-serversideAdd 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
},
linkify: {
// Additional linkify-it config, optional
}
}
},