A wrapper around epubjs project.
npm i "@derock.ir/epubjs-plus"
import {
library,
StatefulPaginatedEpubViewer,
} from '@derock.ir/epubjs-plus';
const epub = await library.addFromFileDialog();
const viewer = new StatefulPaginatedEpubViewer(epub);
await viewer.initialize();
await viewer.display(targetDom);
relocated
: on new page rendered. returns aRelocatedEventPayload
object.content
: on new content loaded. returns aDocument
object.render
: on new content rendered. returns aDocument
object.page-changed
: on page changes. sends aPagination
object.
pagination-update
: on pagination info update. sends aPaginationUpdateEventPayload
object.pagination-done
: on pagination finished. sends aPaginationDoneEventPayload
object.
swipe:left
: gusture eventswipe:right
: gusture eventtap
: on tapclick-tap
: on tap or click
https://github.com/hebertcisco/ts-npm-package-boilerplate