readium / SDKLauncher-iOS

A small iOS application to serve as a launcher/testbed for the Readium SDK.
BSD 3-Clause "New" or "Revised" License
71 stars 47 forks source link

Edit popup on text selection #62

Closed higginator closed 9 years ago

higginator commented 9 years ago

Hello. In the iOS project, I am trying to make edits to the popup on text selection. Currently, when text is selected there are options to 'Copy' and 'Define'. I would like to add my own module here, a 'translate'. I have looked through the files and found references in annotations_manage.js and annotations_module.js to getCurrentSelection, addHighlight and addSelectionHighlight. I added some console.log statements here and ran the safari developer web inspector to look for these log statements, and could not find them. Am I looking in the wrong place to make edits to this popup on text selection? I decided to post here after seeing no activity in IRC.

danielweck commented 9 years ago

Hello @ghear I did not know that Readium had an IRC channel? :) Please ignore the "annotation" plugin for now: it is being refactored as it is woefully out of date. Furthermore, the popup "menu" that appears when selecting document text in the UiWebView / WKWebView is specific to iOS, so you would probably have to implement your extensions natively (ObjectiveC app code). Alternatively, you could implement a completely non-native popup (i.e. HTML, CSS, Javascript). You should look into the pros/cons. See for example how iBooks on OSX and iOS override the popup dialog.

I am closing this issue because this seems out-of-scope for Readium's iOS "launcher app", but feel free to continue the conversation if you want to. I will be watching this discussion thread.

rkwright commented 9 years ago

Yes, Readium has a IRC chat channel (freenode.net, port 6667, room: readium). However, there are so few of us that the room rarely sees much activity. We tend to stay on the issue tracker(s).