View Single Post
Old 04-04-2026, 08:57 AM   #2
lomkiri
Groupie
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 191
Karma: 1537710
Join Date: Jul 2021
Device: N/A
First of all, I guess you're aware that you can annotate an epub wjhen you're using the calibre's epub reader, annotations are stored inside the epub itself, in the "calibre_bookmarks.txt" file (in the prefs, choose miscellaneous / "Keep a copy of annotations/bookmarks in the e-book file, for easy sharing").

But, of course, they are readable only with the calibre's epub reader itself, not even the editor is understanding the content of the file calibre_bookmarks.txt.

If you want to be able to share the annotations with other people that don't use calibre, you're solution is possible, but it needs to write a plugin that, for example with a button on the toolbar, get the current selection and put it inside a span using the css class you've told (the same plugin would create this class at its first call in the current epub). So it's not a trivial solution.

Edit: Or another one that — using the code that Kovid already wrote in the ebook-viewer — would get the content of calibre_bookmarks.txt and put it inside the code of the epub.

Last edited by lomkiri; 04-04-2026 at 11:18 AM.
lomkiri is offline   Reply With Quote