satorumurmur / bibi

Bibi | EPUB Reader on your website.
https://bibi.epub.link
MIT License
859 stars 123 forks source link

fire event on selection of text #50

Open monolithpl opened 6 years ago

monolithpl commented 6 years ago

is it possible to fire an event when some text is selected / double clicked in the epub? i've tried the standard onselect / selectionchange javascript events, but they seem to be blocked. could you please share a snippet of code on how this could be done? this would help people translate words in the epub books.

monolithpl commented 6 years ago

aside from the standard javascript functions, i've also tried the functions from your sML library, which is part of bibi, but neither sML.Selection.getSelectedText() nor sML.getSelection() return the text that is selected.

wildmoose commented 4 years ago

Has this been fixed? I need a way to get selected text in ebook

bigcandy95 commented 1 year ago

Has this been fixed? Does any one have an idea for this?