strapi / blocks-react-renderer

A React renderer for the Strapi's Blocks rich text editor
Other
107 stars 15 forks source link

Rich Text Block Editor in Next.js 13 is not working #23

Closed MarianaZavarynska closed 4 months ago

MarianaZavarynska commented 4 months ago

Strapi Version: 4.0 Operating System: Linux Database: PostgresDB Node Version: 18.17.1 NPM Version: 9.6.7 Yarn Version: 4.0.0

Hi. I have added a single type that consists of Rich Text Block Editor components. Now I am working on getting and rendering those data in my Next.js project. I use @strapi/blocks-react-renderer but it’s not working. Probably, because I have Next.js 13 version and without Typescript. Could you help me? What should I use to render those data?

joshuaellis commented 4 months ago

Please follow the template of the issue.

MarianaZavarynska commented 4 months ago

   const blocksContent =  [
        {
            type: 'paragraph',
            children: [{ type: 'text', text: 'A simple paragraph' }],
        },
    ];
    <BlocksRenderer content={content} /> 
****```.I got error here:  props.content.map is not a function**