📘
prose
  • Get Started
    • Introduction
    • Demo & Showcase
    • Contact / Community / Links
    • Getting started
    • Core concepts
    • Troubleshooting / FAQ
  • Alternatives
  • Learn
    • Core
    • Streamer
      • Node
      • React Native
      • Service Worker
      • Web (dom)
      • Hooks
    • Enhancers
    • Viewport
    • Hooks
    • Pagination
    • Settings
    • Context
    • Navigation
    • Selection
    • Links
    • Zoom
    • PDF
  • CORE API
    • reader
      • links$
      • locateResource()
    • viewport
    • navigation
  • zoom
  • enhancers
    • PDF
    • Gestures
    • Gallery
    • Search
    • Annotations
    • Bookmarks
  • React Reader
    • Introduction
    • Getting Started
  • CFI
    • About
Powered by GitBook
On this page
  • Installation
  • Configuration
  • Toggling features
  • Search
  • Bookmarks
  • Annotations
  • Gallery

Was this helpful?

  1. React Reader

Getting Started

PreviousIntroductionNextAbout

Last updated 12 days ago

Was this helpful?

Installation

npm install @prose-reader/core @prose-reader/react-reader @chakra-ui/react @emotion/react rc-slider react-icons reactjrx

This package only uses peerDependencies so don't hesitate to use the library for the rest of your app.

is specifically very useful if you use rxjs.

Configuration

TODO

Toggling features

By default, the reader will use the bare core reader. If you want to unlock more features you can enhance your reader with automatically supported enhancers.

For example adding the enhancer Search will unlock this menu:

import { searchEnhancer } from "@prose-reader/enhancer-search"
import { createReader } from "@prose-reader/core"

export const createAppReader = searchEnhancer(createReader)

We are detecting certain markers in the enhancers to verify whether they exist and are valid. This is assuming you dont fiddle with them. The general rule of enhancers is to allow augmentation but not alteration.

Search

See Search to install enhancer

Bookmarks

See Bookmarks to install enhancer

Annotations

See Annotations to install enhancer

Gallery

See Galleryto install enhancer

https://github.com/mbret/reactjrx