{"action":"created","issue":{"url":"https://api.github.com/repos/readium/readium-shared-js/issues/286","repository_url":"https://api.github.com/repos/readium/readium-shared-js","labels_url":"https://api.github.com/repos/readium/readium-shared-js/issues/286/labels{/name}","comments_url":"https://api.github.com/repos/readium/readium-shared-js/issues/286/comments","events_url":"https://api.github.com/repos/readium/readium-shared-js/issues/286/events","html_url":"https://github.com/readium/readium-shared-js/issues/286","id":150053861,"number":286,"title":" Get CFI of a scentence in the epub-book","user":{"login":"Seanberite","id":12657291,"avatar_url":"https://avatars.githubusercontent.com/u/12657291?v=3","gravatar_id":"","url":"https://api.github.com/users/Seanberite","html_url":"https://github.com/Seanberite","followers_url":"https://api.github.com/users/Seanberite/followers","following_url":"https://api.github.com/users/Seanberite/following{/other_user}","gists_url":"https://api.github.com/users/Seanberite/gists{/gist_id}","starred_url":"https://api.github.com/users/Seanberite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seanberite/subscriptions","organizations_url":"https://api.github.com/users/Seanberite/orgs","repos_url":"https://api.github.com/users/Seanberite/repos","events_url":"https://api.github.com/users/Seanberite/events{/privacy}","received_events_url":"https://api.github.com/users/Seanberite/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-21T12:03:03Z","updated_at":"2016-04-22T14:35:10Z","closed_at":null,"body":"Is it possible to extract the CFI of a word or string that is on the page given the specific xhtml file and the specific sentence. I'm implementing a search function and I already know that the specific sentence is on the page, but i need to extract the CFI. \r\n"},"comment":{"url":"https://api.github.com/repos/readium/readium-shared-js/issues/comments/213450952","html_url":"https://github.com/readium/readium-shared-js/issues/286#issuecomment-213450952","issue_url":"https://api.github.com/repos/readium/readium-shared-js/issues/286","id":213450952,"user":{"login":"danielweck","id":625201,"avatar_url":"https://avatars.githubusercontent.com/u/625201?v=3","gravatar_id":"","url":"https://api.github.com/users/danielweck","html_url":"https://github.com/danielweck","followers_url":"https://api.github.com/users/danielweck/followers","following_url":"https://api.github.com/users/danielweck/following{/other_user}","gists_url":"https://api.github.com/users/danielweck/gists{/gist_id}","starred_url":"https://api.github.com/users/danielweck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielweck/subscriptions","organizations_url":"https://api.github.com/users/danielweck/orgs","repos_url":"https://api.github.com/users/danielweck/repos","events_url":"https://api.github.com/users/danielweck/events{/privacy}","received_events_url":"https://api.github.com/users/danielweck/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T14:35:10Z","updated_at":"2016-04-22T14:35:10Z","body":"Hello, I see you've already started working with @larsvoigt 's `epub-full-text-search` project:\r\nhttps://github.com/Seanberite/epub-full-text-search/commits/master\r\n\r\nLet's join @JCCR to this discussion.\r\nYou can convert user selections and DOMRanges via Readium's CFI API, but I'm not sure about doing this without loading the HTML document into a webview (i.e. from the DOM). I assume you want to load raw HTML files (plain text source), maybe parse the markup on the server side (NodeJS)?"}}