Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

"Typed" Ebook page wise

  • Hello there, I am new in android development. But onsen + monaca forced me to try to make a simple android app. I am trying to create an ebook. which is(will be) written in right hand side language (arabic, persian, urdu, etc). should i use a single long content? if not than How pages will work.

    2nd and last thing I want to add is search. When I search a word It should show first instance, than next.

    If there is any tutorial regarding all above , kindly mention it.

  • @eaglehdr I actually wrote an eBook template / tutorial located here:

    It has the search component you seek. As far as the Arabic content, there are some JS libraries that can reverse the string and that might be a starting point. One of the better ones is:

  • @munsterlander thanks for your template. I am working on it. but I dont think that library for Arabic content is related to what I want. I just read that arabic can be read by browser so I dont have to take care of that.

    Now the complex thing. I want a search box on main screen. I want it to work like google chrome’s search bar. when person click next or previous. It show and highlight that keyword. Is it possible?

  • @eaglehdr Yes. That is what is in the ebook template. You would need to work out the scroll to word portion, but since the words are highlighted using the mark tag, you should be able to make it jump to the mark with:

    var x = 0;
    var wordArr = document.getElementsByTagName("mark");

    So then just increment x on your button click. You would want to limit it to the length of the array, but I figure you can handle that portion.