Add HTML line to OpenFl/Haxe code

How do I add these lines to my OpenFl/Haxe code:

<script src="https://code.responsivevoice.org/responsivevoice.js?key=******"></script>
responsiveVoice.speak("hello world");

I get these errors when I do a lime build html5:

Markup literals must be processed by a macro
Unknown identifier : responsiveVoice

Thanks in advance!

As a quick fix, you can manually add those lines to the built HTML output. This is how I’ve dealt with such things in the past, but those were short-term projects, so a quick fix was fine.

Perhaps a macro is a more long term solution, but that’s something I’ve yet to get my head around.

If you don’t need anything in those lines to be dynamic, you could create a custom index.html to be used in your assets. You would need to add this to your project.xml:

<template path="assets/index.html" rename="index.php" />

The rename part is optional but gives you an idea of what’s possible.
Does that help at all?