Open lgme opened 6 years ago
Interesting. Do you get any errors in the console or doesn't just anything happen?
Silly me, I'm doing it wrong. Ionic has its own navigation system and I need it to navigate one page to another, similar to the chapter navigation in the _subscribeToEvents() method
The problem is how do I convert <a>...</a>
tags in <ion-item>
elements? Any ideas please?
I would try to hook into the existing onclick
handlers for those links. Maybe just overwrite h1
? Any idea what nav.wait()
does?
The js code is is the OEBPS/Text/js/tooltip.js file. Below is a screenshot of the code. I sent you the unpacked epub archive.
Whoah.
Any idea where h1()
comes from and what it does? Seems to me that this then should switch the location?
All the js functions are available in the tooltip.js file. tooltip.zip
Each paragraph in the page is uniquely identified by an id (ie 01001001). "01" - book number, "001" - chapter number, "001" - verse number. If you look at my first comment, when I click the "Genesis 1" link it should send me to the "b01.00.Genesis.text.xhtml" page, at the header element wit the id=v01001001
I couldn't find a h1
method in that file.
I couldn't find a
h1
method in that file.
It's not h1, its hl
Ahhh, it's hl
, not h1
;)
Hmmm, I have no idea how one could handle those "internal" navigation functions, especially if the params and target have no relation to what epubjs knows as navigation targets etc. Maybe epubjs has some logic to handle those that I never saw and touched?
Would it be possible to include ionic elements in epub files? After all, ionic elements are xml elements.
No idea if those would be included in the rendering process of Ionic.
But if you control the content of the epub, you could just replace the function calls with the appropriate ones (see the TOC).
I'm not sure I'm quite following you. What TOC are you referring to?
How the TOC of the ebook handles navigation to pages. You posted a screenshot of it above.
From the screenshot below if I click the "Genesis 1" it should open the next page. The link is valid and it works in epub readers on desktop (I use Microsoft Edge 42.17134). However, it doesn't do anything in testing mode (ionic serve) or after publishing the app, on mobile.
I've sent you the epub file in the zip archive.
The full epub file can be downloaded from crossway.org
esv_bible.zip