GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
Other
22.69k stars 4.11k forks source link

generate html should keep id when script-export is set #6276

Closed Singwai closed 3 weeks ago

Singwai commented 3 weeks ago

Question: With cleanId enabled, should we check both script and script-export similar to match the js code generator logic in the html custom attributes function?

Here is the reference to ths jsGenerator. I think the getHtml code with cleanId might be have a chance to lost the id during export depending on the component's configuration.

Potential STR: A component with script-export defined and script is empty Without explicitly setting the id in the component attribute Call editor.getHtml({cleanId: true})

artf commented 3 weeks ago

Makes sense @Singwai thank you 🙇‍♂️