Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Unable to get the selected text from iframe #45
There is an event emitted from a Readium Reader instance called "textSelectionEvent". This will tell you when a user has finished selecting something inside an iframe. As of this moment it is implemented at a basic level in the "develop" branch in the epub annotations module: https://github.com/readium/readium-shared-js/blob/develop/lib/annotations_module.js
Search for "// emit an event when user selects some text." in that file to see how this event is implemented.
Thanks a lot for the clue. I am using readium-js-viewer in visual studio
On Wed, Apr 9, 2014 at 2:50 AM, Juan Corona email@example.com:
You have to expose that reference and then you can add an event handler (that event is emitted by the annotations_module, you don't have to worry about using it directly).
You can even stick this code here: https://github.com/readium/readium-js-viewer/blob/develop/lib/EpubReader.js#L554