Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically changing highlight color #296

Open
codepeach opened this issue Oct 24, 2024 · 2 comments
Open

Dynamically changing highlight color #296

codepeach opened this issue Oct 24, 2024 · 2 comments

Comments

@codepeach
Copy link

Is there a way I can dynamically change the color of the highlights based on what emoji the user selects? I can't seem to figure a solution for this. Not quite an issue, but It's a limitation

@KarthikeyaKollu
Copy link

KarthikeyaKollu commented Dec 3, 2024

@codepeach HI dude, try these overding CSS(Global) to change

to change highlight color:
.part {
cursor: pointer;
position: absolute;
background: rgba(255, 226, 143, 1);
transition: background 0.3s;
}

the color of the text:

.textLayer {
z-index: 2;
opacity: 1;
display: flex;
${blendModeStyle}
}
.textLayer :is(span, br) {
color: ${color};
background-color: ${backgroundColor};
position: absolute;
white-space: pre;
cursor: text;
transform-origin: 0% 0%;
font-family: ${fontFamily};
font-size: ${fontSize};
font-weight: ${fontWeight};
font-style: ${fontStyle};
}

@KarthikeyaKollu
Copy link

if want to change the library itself look for
AreaHighlight.module.css for area highlight
or Highlight.module.css or text highlight
or to overide the text color of pdfjs looks for pdf_viewer.css
Hope it helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants