Solved

html extension working in page preview but not in export

I'm currently working with Lectora Online in a shared project. I am using an html extension with the type bottom of file scripting, which works perfectly fine in the page preview (f9). But when I export and host it on my server, the end of line just shows up empty (the place in de HTML says " ").


I already tried all different types of html extension types, and none of them work on export.


Has anyone else had this and how did you make it work?

Solution

So the HTML Extensions work a bit differently. They load in the the page iframes. You can still use the GSAP library, the targeting of the elements works a bit differently, because you need to target the HTML Elements in the Display Document. Look at the example and let me know if you have any questions.


PKG File to Import into Lectora Online

Discussion (8)

This issue seems to only be a thing in seamless play. Does anyone have any suggestions?

Try turning off the Seamless Play Publish option when you publish. See if that makes any difference.

I guess I missed your second post. 😀 I wasn't trying to be a smart aleck! When SPP is enabled HTML extensions are loaded differently. If you need SPP enabled then maybe you can explain what you are trying to do and the community can try to help you accomplish it.

Hi,

thanks for reaching out! Sorry it took some time to reply, I assumed to get notified by mail when people interacted with this topic.


At first I was trying to put some functions into a seperate .JS file to keep things organized, but I ended up just putting the code directly into the actions on each object.


In my current project I am adding animated SVG's and want to make sure the animation on some objects starts running at a specific time. I trigger this now by changing the img source through scripting. It works, but it's not as neat as I would like.


Now I want to add the GSAP library for some more animations, but I am running into the seamless play issue again. Is it simply impossible to add an HTML extenstion when using the seamless play, or does someone know a fix for this?


I could put the code in an action again and write a check with JS to see if the GSAP library has already been added (and add it when needed,) before actually doing the code, but that feels redundant.

And as to why I want to keep SPP enabled:

This is not due to any technical things I'm doing, but its more of an "I like the esthetic more".

I'm putting a lot of effort into making this e-learning look like something from modern day standards. Having a white loading screen everytime I go to a different page really feels like browsing back when I was a teenager. Not disastrous, but simply not the vibe I'm going for.

So the HTML Extensions work a bit differently. They load in the the page iframes. You can still use the GSAP library, the targeting of the elements works a bit differently, because you need to target the HTML Elements in the Display Document. Look at the example and let me know if you have any questions.


PKG File to Import into Lectora Online

Thank you for replying and sending me this package!😀 I will update my project to use the same settings you did, because this seems to work fine. I will also post my findings here later for future reference.

Great, thank you @VikBen for taking your time and posting here, it helps us to make the product better and also gives solutions to people who have the same issue.