Plugin: Get the selection in a PDF page

61 views
Skip to first unread message

le zhang

unread,
Aug 10, 2023, 10:42:00 PMAug 10
to zotero-dev
Hi,

I am also learning how to develop a zotero plugin as the OP of this post where they said that they can get the selection using the following snippet: 

- `readerinstance._iframeWindow?.getSelection()`
- `readerinstance._iframeWindow?.document.getSelection()`
- `window.getSelection()` which listens to the `selectionchange` event.

I am stuck. I get nothing in the Tools > Developer > Run JavaScript after running any line of the above code. 

Could anyone please kindly point me the right direction? 
Thanks

Best,
Lerner

Francisco Bischoff

unread,
Aug 10, 2023, 10:46:39 PMAug 10
to zoter...@googlegroups.com
I just made a plugin for zotero 7, may help you to dig the code:


--
Francisco Bischoff


--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/71a20bbd-4618-4899-88c9-9f927e0c02a1n%40googlegroups.com.

XY Wong

unread,
Aug 10, 2023, 11:34:44 PMAug 10
to zotero-dev

le zhang

unread,
Aug 11, 2023, 3:22:41 AMAug 11
to zotero-dev
Thanks! Solved!
Reply all
Reply to author
Forward
0 new messages