How to use the epubjs.Views function in epubjs

To help you get started, we’ve selected a few epubjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github InfiniteLibrary / infinite-electron / app / components / Epub / index.js View on Github external
_start() {
    this.rendition = this.book.renderTo('stage', {
      flow: this.props.flow || 'paginated',
      minSpreadWidth: 550,
      width: '100%',
      height: '100%',
      manager: ePub.ViewManagers.default,
      view: ePub.Views.iframe
    });

    this.rendition.themes.register(`${getStreamHost()}/static/epub.css`);
    this.rendition.themes.apply('book-theme');

    this.rendition.display(this._visibleLocation);

    this.rendition.on('locationChanged', (visibleLocation) => {
      this._visibleLocation = visibleLocation.start;

      if (this.props.onLocationChange) {
        this.props.onLocationChange(visibleLocation);
      }
    });

    this.book.loaded.navigation.then((nav) => {

epubjs

Parse and Render Epubs

BSD-2-Clause
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis

Similar packages