what i have:
SearchEngine: to index epub -> get result.json, search in json
json file (example):
{
"results": [
{
"baseCfi": "/6/10[xintroduction_001]!",
"cfi": "/6/10[xintroduction_001]!/4/2/6/2",
"highlight": "others, and to teach them by what name a <b class='match'>whale</b>-fish is to be called in our tongue leaving out, ...",
"href": "introduction_001.xhtml",
"path": "moby-dick//OPS/introduction_001.xhtml",
"title": "ETYMOLOGY."
},
...
]
}
Currently i can search in epub and get the information like “baseCfi” or “cfi”.
My Question is, how can i do a Textfield tab able, to link that with result-cfi or baseCfi?
opening the page by pressing the search-result area
e.g. my search text is “name a whale” and search-result is “to school others, and … name a wahle-…” and when I tab on “search-result” i want to open the epub page “/6/10[xintroduction_001]!/4/2/6/2”
You don’t want to load a new page with this page - you already have the book open. That is why the TOC sends an event that the book page listens to and then goes to the correct page.
You will have to see if this goto function here is the correct one for the data type you get in the search results. You will want to read about and understand these Cfi thingies. (I think I linked them in the docs of the repo)