Export inline html

hI,
there is a way to export a project without the code inside the file "XXX_hype_generated_script", but directly inside the main html index file? like if it is was written by hand. To me could be useful in order to make some arrangement to code after the export.

thank you in advance!
M

Hi Mirko,

If you check "inline data file+loader" in Advanced Export, that will include the code in your HTML file

1 Like

Here's how I would do it:

1 Like

Also feel free to elaborate on your needs/requirements for this; it is always good for us tool creators to know about where requests like this come from to make sure we're handling the output optimally :slight_smile:.

1 Like

thank you all for your answers!
this is not what I need unfortunately. whit this option I have just texts inside anonymous divs. what I'm searching for is classes and style rules directly inline in the div tags, so I can modify them. The code inside the js generated by exporting the work in hype, is to much minified and not readable with standard css classes. there was a software (no longer available) that did this job: sencha animator. I don't know if you know it, but what I'm looking for is exactly that. maybe you could schedule it for a future update perhaps?

thanks! m

1 Like

Hype's data for animations and page structure is stored in a JSON format and the export is not meant to be editable. The hidden divs you are seeing are probably those meant for SEO support (so text content still gets read).

If you want to attach specific styles to elements created in Hype, you can go to the Identity Inspector and add a Unique Element ID or Class Name. This can then be referenced in any of your CSS, including that created by going to Edit Head HTML in the Document Inspector. You may need !important directives if the styles are overriding that which Hype would set, or unchecking Protect from external styles if you are targeting the Inner HTML of Hype-created elements.

1 Like