Im facing a problem with CKeditor 5 plugin in Strapi v4 which doenst close ** **tag and throws error compiling MDX using 'next-mdx-remote/serialize'
utils/index.ts `
export const serializeArticleMarkdown = async (item: IArticle) => {
const body = await serialize(item.attributes.body as string);
return {
...item,
attributes: {
...item.attributes,
body,
},
};
};
/pages/[slug].tsx
<MDXRemote
{...(article.attributes
.body as unknown as MDXRemoteSerializeResult)}
/>
while getting props from getServerSideProps ->
return {
props: {
article: await serializeArticleMarkdown(articles.data[0]),
},
};
`
I tried to find options and plugins for both 'next-mdx-remote' and CKeditor itself. Only working solution for me was using Markdown directly in editor. Which is useless for noncoding customer