a856097402
Hello everyone! I would like to add the example using [Kentico Kontent](https://kontent.ai) as a data source for your example. I have tried to be consistent with the other examples and showcase the preview as well. I have tried to keep up with [Contribution guidelines](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples). Thank you.
7 lines
206 B
JavaScript
7 lines
206 B
JavaScript
import remark from 'remark'
|
|
import html from 'remark-html'
|
|
|
|
export default async function markdownToHtml(markdown) {
|
|
const result = await remark().use(html).process(markdown)
|
|
return result.toString()
|
|
}
|