destack icon indicating copy to clipboard operation
destack copied to clipboard

componenst React?

Open vizardkill opened this issue 3 years ago • 1 comments

Since the project uses grapes js, is it possible to build React components to add the editor within the project?

vizardkill avatar Feb 16 '22 04:02 vizardkill

@vizardkill

If you want to use external react components in Destack's editor, that is not possible.

But, you can create a new Next.js page and your React components along Destack.

Eg.

import { ContentProvider } from 'destack'
import 'grapesjs/dist/css/grapes.min.css'

export { getStaticProps } from 'destack/build/server'

export default function Page(props) { 
    return (
        <div style={{height: '100%'}}>
            <span>Hello world</span>
            <ContentProvider {...props}/>
        </div>)
}

LiveDuo avatar Mar 16 '22 00:03 LiveDuo