Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2025, 05:37 AM   #1
trrahul
Junior Member
trrahul began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2025
Device: none
Exclamation Plugin support for adding context menu item

Hello, I want to create a plugin that does something with the selected text. I read the plugin documentation and found nothing related to context menus. Is it possible to add a context menu item via plugin?
trrahul is offline   Reply With Quote
Old 01-14-2025, 08:15 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,144
Karma: 27110892
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Selected text in what?
kovidgoyal is offline   Reply With Quote
Advert
Old 01-14-2025, 02:34 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,598
Karma: 29709834
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by trrahul View Post
Hello, I want to create a plugin that does something with the selected text. I read the plugin documentation and found nothing related to context menus. Is it possible to add a context menu item via plugin?
If you mean selected text in a book's content you should look at the Book viewer's Bookmark feature, see =>> The calibre E-book viewer

Click image for larger version

Name:	Screenshot 2025-01-15 063155.jpg
Views:	101
Size:	159.6 KB
ID:	213080

I think it only works on EPUBs and maybe AZW3s. The bookmarks are written to format file - i.e. the "whatever - whoever.epub" file in the book folder.

BR
BetterRed is offline   Reply With Quote
Old 01-15-2025, 09:19 AM   #4
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,182
Karma: 1306007
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by BetterRed View Post
If you mean selected text in a book's content you should look at the Book viewer's Bookmark feature, see =>> The calibre E-book viewer
The Viewer does not have a plugin framework, only the main calibre and the Editor.
thiago.eec is offline   Reply With Quote
Old 01-15-2025, 04:46 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,598
Karma: 29709834
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by thiago.eec View Post
The Viewer does not have a plugin framework, only the main calibre and the Editor.
Where did I suggest the Viewer had plugins… explicitly or implicitly. I simply referred the OP to a built-in feature ("the Book viewer's Bookmark feature") that does what I think they want.

BR
BetterRed is offline   Reply With Quote
Advert
Old 01-15-2025, 10:02 PM   #6
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,182
Karma: 1306007
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by BetterRed View Post
Where did I suggest the Viewer had plugins… explicitly or implicitly. I simply referred the OP to a built-in feature ("the Book viewer's Bookmark feature") that does what I think they want.

BR
Ok. Sorry.
thiago.eec is offline   Reply With Quote
Reply

Tags
plugin development, question


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thank you for adding Smarten punctuation in context menu in Comments editor homeceo43 Calibre 1 05-15-2020 10:37 PM
UI plugin icon not displaying in context menu jackie_w Development 10 02-10-2020 08:34 PM
How to register a plugin to viewer selected text context menu? Gerbrand Development 2 05-04-2014 01:24 PM
Giving users menu/toolbars option when adding plugin kiwidude Development 19 03-12-2011 04:00 PM
How to create custom context menu item? gizban Calibre 2 08-22-2010 06:22 PM


All times are GMT -4. The time now is 09:06 PM.


MobileRead.com is a privately owned, operated and funded community.