-
I understand at the moment all the blocks under themes are html trunks, the styles are embedded via tailwind. Sometimes, a block needs to include some browser-side JavaScript to achieve a better display effect. Based on the existing design, what would be a good way to implement support for embedding browser-side JavaScript files? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I'm slightly surprised no one has asked this before as the main goal of this project is to have a visual editor but allow customizability like a normal Next.js project. There are two options: |
Beta Was this translation helpful? Give feedback.
I'm slightly surprised no one has asked this before as the main goal of this project is to have a visual editor but allow customizability like a normal Next.js project.
There are two options:
a) In the Next.js page that you loaded Destack, you can use a
useEffect
or another React component to load javascript.b) Edit the html trunk and add the javascript there