0 Replies Latest reply on Nov 26, 2014 12:07 AM by TildaMarleen

    How to get <span> tags (with id) around each single word of text?


      Hello everyone,


      i want to use edge animate for my epub3 books and one basic feature is to have it read aloud while highlighting the words. This is pretty simple to achieve in epub3, you just have to give each word an id (span tag) and have a corresponding smil file with the timecodes and the epub3 reader does the hightlighting automaticly. How can i insert text into edge animate and wrap every word in an span tag? I can provide the text preprocessed with tags like this:


      <span id="W1">Aus</span> <span id="W2">den</span> <span id="W3">gesammelten</span> <span id="W4">Brombeeren</span> <span id="W5">wollten</span> <span id="W6">sie</span> <span id="W7">später</span> ...


      and got a smil file like this:


      <?xml version="1.0" encoding="UTF-8"?>
      <smil xmlns="http://www.w3.org/ns/SMIL" version="3.0">
      <par id="par1">
      <text src="../pg02.xhtml#W1" />
      <audio src="../audio/pg02.m4a" clipBegin="0.000000s" clipEnd="1.382498s" />
      <par id="par2">
      <text src="../pg02.xhtml#W2" />
      <audio src="../audio/pg02.m4a" clipBegin="1.382498s" clipEnd="1.644169s" />
      <par id="par3">
      <text src="../pg02.xhtml#W3" />
      <audio src="../audio/pg02.m4a" clipBegin="1.644169s" clipEnd="1.932008s" />
      <par id="par4">
      <text src="../pg02.xhtml#W4" />
      <audio src="../audio/pg02.m4a" clipBegin="1.932008s" clipEnd="3.009222s" />
      <par id="par5">
      <text src="../pg02.xhtml#W5" />
      <audio src="../audio/pg02.m4a" clipBegin="3.009222s" clipEnd="3.253448s" />
      <par id="par6">
      <text src="../pg02.xhtml#W6" />
      <audio src="../audio/pg02.m4a" clipBegin="3.253448s" clipEnd="3.650317s" />
      <par id="par7">
      <text src="../pg02.xhtml#W7" />
      <audio src="../audio/pg02.m4a" clipBegin="3.650317s" clipEnd="3.842209s" />


      I hope it is clear what my problem is, can you help me please?