Adding JavaScript to HEAD of an HTML book
  • I want to add a reference to video.js in a book so I can insert "how-to" videos in the body of a book (using custom HTML markup until video insertion is supported.) Where can you edit the <head> of a book?
    Post edited by Peter Quirk at 2013-04-01 09:30:43
  • 2 Comments sorted by
  • Hi Peter,

    I assume you are talking about ebooks? At the moment you can edit audio/video tags in TinyMCE editor but there are some issues (TinyMCE really loves to rewrite your tags) with it. Epub will include that video/audio but epub will not validate. 

    You can check example for this here http://aco.booktype.pro/the-binary-chronicles/_draft/_v/1.0/audio/ . At the moment our current ebook engine does not provide much control over output results (not just regarding video, but also internationalization, spine, ...) but we are working on brand new one. You can see some early drafts of new engine here: http://aco.booktype.pro/ .

    Until we have new epub engine inserting video files will not have much sense.

    Aco


  • Aleksander,

    I wanted to include a standard <script> element in the <HEAD> of a book (or all chapters) so that I can paste HTML markup for video.js in certain pages. I intend to publish these pages in HTML when this is formally supported by BookType. I don't know where the basic HTML templates are stored and hence where JavaScript can be added.

     

    Peter