I try to create highlight when the user selects text, but when I change to the next 5 pages then come back. The highlight is gone. sometimes time it shows sometimes is not.
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View, ScrollView } from 'react-native';
import { Epub, Streamer } from 'epubjs-rn';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
Hi,
I try to create highlight when the user selects text, but when I change to the next 5 pages then come back. The highlight is gone. sometimes time it shows sometimes is not.
`/**
import React, { Component } from 'react'; import { Platform, StyleSheet, Text, View, ScrollView } from 'react-native'; import { Epub, Streamer } from 'epubjs-rn';
const instructions = Platform.select({ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for dev menu', });
export default class App extends Component {
constructor(props) { super(props); this.state = { src: "", //url : "https://s3-us-west-2.amazonaws.com/pressbooks-samplefiles/MetamorphosisJacksonTheme/Metamorphosis-jackson.epub", url: "http://192.168.2.40/epub/book2.epub", sliderDisabled: false, }; this.streamer = new Streamer(); }
componentDidMount() {
}
componentWillUnmount() { this.streamer.kill(); }
render() { return (
} }
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#EEEEEE', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, }, }); `