Bookmarks, Highlights & Notes
18 min read
Persist and Navigate to Bookmarks
Persist and Navigate to Bookmarks
Task
Load a Book’s bookmarks and allow the user to jump back to one.
Return bookmark records ordered by location or creation time.
When a bookmark is selected:
await rendition.display(bookmark.cfi);
If the Reader opens a bookmark from another screen, pass the target CFI through the navigation state or URL and display it after the EPUB is ready.
Test
Create bookmarks in two different chapters.
Leave the Reader, reopen the Book, and navigate to each bookmark.
Checkpoint
Bookmarks are persistent navigation points rather than temporary Reader state.