0 Replies Latest reply on Mar 12, 2015 9:13 AM by hb4245878

    Insert <script></script> into body




      I'm having trouble figuring out how to add JavaScript to the body of one of my content xhtml docs using Export to EPUB...


      I know I can include a .js file that will live in OEBPS > Scripts > file.js in the export dialogue, but the part I can't figure out is how to pop a few lines of script in the XHTML.


      Specifically I'm trying to use FitText.js to make the font-size of the title of a book scale to the width of the parent container (figured I'd use the non-jQuery version though for simplicity). So I'm supposed to include


        window.fitText( document.getElementById("responsive_headline") );


      in the body of the XHTML doc for the title page... and possibly also <script src="../script/fittext.js"></script>... wondering if there's a way to set this up in InDesign instead of having to manually edit the XHTML doc after export.

      Any idea if this is possible?