Sign in

Epubjs each theme color page can only be changed once, need to turn the page to change the next time

lunatech edited in Thu, 26 Jan 2023

Initialization theme is no problem, will be displayed, I pass themes.register Four styles have been registered, but the four styles can only be changed once a page. After all the four styles have been changed, you need to turn the page before you can change them themes.select Will change the style, I hope you can guide, thank you very much


themes.forEach(theme => {
   this.rendition.themes.register(theme.name, theme.style)

Click Replace

setTheme (index) {
      const name = this.themeList[index].name
      this.setDefaultTheme(name).then(() => {
      setTheme(this.fileName, name)
1 Replies
commented on Thu, 26 Jan 2023

With version 0.3.71