EPUB reader
Publish ebooks: .epub files open in a full reader with contents, search, text settings, themes and page or scroll layout.
Show an ebook#
With Foliora Pro active, .epub uploads are allowed in the Media Library, and an EPUB opens in the reader automatically — no extra attribute needed:
[foliora file="https://example.com/wp-content/uploads/the-quiet-garden.epub"]
The Foliora Viewer block, page-builder widgets, the bookshelf, the lightbox and protected links accept EPUBs too.
Reader controls#
| Control | What it does |
|---|---|
| Contents | Jump to a chapter from the book's table of contents. |
| Search in book | Find text across all chapters; click a result to go there. |
| Text settings | Font (book default, Serif, Sans), text size, Line spacing (Normal, Relaxed), Theme (Light, Sepia, Dark) and Layout (Pages or Scroll). |
| Previous / next page | Also ← →, PageUp PageDown, or swipe on touch screens. |
| Bookmark | Bookmark the current position (logged-in readers). More |
| Fullscreen | Use the whole screen. |
| Download the EPUB | Shown unless download is hidden or locked. |
Readers' text settings are remembered on their device.
Defaults for every reader#
Foliora → Pro Settings → Reader → EPUB text: default font (as designed by the book, Serif or Sans-serif) and default text size (70–200 %). Readers can still change both.
Protection#
- EPUBs can be put in Secure Mode like PDFs.
- The copy lock also applies inside EPUB pages.
- With access rules, readers without access see a locked card (previews are PDF-only).
The reader is built on epub.js, bundled with the plugin — nothing loads from a CDN. Fixed-layout EPUBs and EPUBs with DRM are not supported; convert DRM-free reflowable EPUB 2 or 3 files for best results.
For developers#
The EPUB reader follows the same DOM contract as the PDF viewer: it fires foliora:ready and foliora:relocated ({ cfi, percentage, label }) on its container, and exposes container.__folioraGoToCfi( cfi ) and container.__folioraGetLocation(). Start a reader added after load with FolioraProEpub.bind( element ).