epub.js icon indicating copy to clipboard operation
epub.js copied to clipboard

Unable to change the underline color

Open SamuelPremji opened this issue 2 years ago • 2 comments

By default the underline color is grey. I know how to change the highlight color but for underline it does not work. Anyone knows?

Here's how I did it for changing the highlight color:

rendition.annotations.add("highlight", cfiRange, {}, (e) => {console.log("highlight clicked", e.target);} , "hl", {"fill": "green", "fill-opacity": "0.5", "mix-blend-mode": "multiply"})

SamuelPremji avatar Jul 04 '23 16:07 SamuelPremji

This is a problem caused by the library used by epub.js called marks-pane

There has been a pull request open to fix this issue for a few months https://github.com/fchasen/marks/pull/6

victorsoares96 avatar Mar 21 '24 17:03 victorsoares96

I posted the suggested fix in the pull request if you want to use it

https://www.npmjs.com/package/@victorsoares96/epubjs

npm i @victorsoares96/epubjs

victorsoares96 avatar Mar 21 '24 18:03 victorsoares96