VvvebJs icon indicating copy to clipboard operation
VvvebJs copied to clipboard

Integrating with Nextjs

Open Meistro77 opened this issue 1 year ago • 1 comments

Hey Givanz,

Thank you for the time and energy you put into this. I tried every builder out there and yours has the best feel, form, and function. I'd like to integrate it with a nextjs platform written in tsx and wondered how to best go about it. I was debating using Iframe, but I'd like to avoid that if there's a better way. My fear with wrapping it into a react component is that DOM manipulations wouldn't be maintained.

Are you interested in consulting with me?

Thanks again, Ty

Meistro77 avatar Aug 07 '24 13:08 Meistro77

Hi

Thank you.

There are many possible issues with using VvvebJs as React component, for example templates https://github.com/givanz/VvvebJs/blob/master/editor.html#L871 use <script> tag that is not supported by jsx and you need to adapt the code to work.

I think that the best approach is to keep them separate and from the React component only hide/show/load the html and initialize the editor https://github.com/givanz/VvvebJs/blob/master/editor.html#L2251-L2261 avoiding jsx and deep React integration.

givanz avatar Aug 21 '24 06:08 givanz