digital-edition-reader
v1.0.0
Published
React Component for reading Digital Editions
Downloads
1
Readme
Digital Edition Reader
The Digital Edition Reader is a React component that allows for a smooth reading experience for Digital Editions, automatically linking text and annotations.
Installation
To install the Digital Edition Reader run
npm install --save git+ssh://[email protected]:gutzkow/digital-edition-reader.git
Using the Digital Edition Reader
To use the Digital Edition Reader in a web-page, first include its CSS file:
<link rel="stylesheet" href="edition-reader.css"/>
Then at the end of the page include the JS files and then use the install function to load the Digital Edition Reader into a DOM element:
<script src="edition-reader-vendor.js"></script>
<script src="edition-reader.js"></script>
<script>
DigitalEditionReader.install(document.getElementById('element-id'));
</script>
Options
The Digital Edition Reader can also be instantiated with initial options:
<script>
DigitalEditionReader.install(document.getElementById('element-id'), options);
</script>
The following options are currently available (the default settings are shown in brackets):
openReaderLabel
['Start reading'
]: Sets the label of the button used to open the reader.displayReader
['none'
]: Sets the initial visibility state of the reader. To automatically show the reader upon loading, set this to'block'
.