question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change background color of selected text

See original GitHub issue

Summary

I want to change the background color of selected text

Screenshots

https://imgur.com/a/bXzmMqh

Version

@toast-ui/react-editor: 2.5.3, react: 16.10.2

Additional context

I tried to change the background by :selection pseudo-element but it not work. Does someone have a solution for it?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
js87zzcommented, Apr 28, 2021

@ndhhien27 Can you try as below?

/* change the color what you want */
.CodeMirror-selected { background: blue !important; }
.CodeMirror-focused .CodeMirror-selected { background: blue !important;}
0reactions
stale[bot]commented, Jun 14, 2021

This issue will be closed due to inactivity. Thanks for your contribution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Change Text Selection Color with CSS - W3Schools
Learn how to override the default text selection color with CSS. Text Selection Color. Select the following text: Default text selection color.
Read more >
Change background colour of selected text
Open Word application in safe mode and then try selecting the text, check if background color of selected text is still black. ·...
Read more >
Change Background Color of selected or highlighted Text in ...
Change the Background Color of highlighted Text in Windows 11/10 ... To change the Highlight Color, open Registry Editor by going to the...
Read more >
selection - CSS-Tricks
Use your cursor select this sentence. Notice how as you select the text a background color fills the space? You can change the...
Read more >
How to change the background color of the selected text?
You can change the background color of the highlighted text from classic blue & white to any color you like in Windows 11....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found