Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

Singwai
Copy link
Contributor

@Singwai Singwai commented Oct 29, 2024

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})

@Singwai Singwai changed the title generate html should keep id when script export is set generate html should keep id when script-export is set Oct 29, 2024
@Singwai Singwai marked this pull request as ready for review October 29, 2024 18:19
@artf
Copy link
Member

artf commented Oct 31, 2024

Makes sense @Singwai thank you 🙇‍♂️

@artf artf merged commit e369c03 into GrapesJS:dev Oct 31, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants