Change the color of the selected text

Operating system

Windows

Joplin version

2.14.20

Desktop version info

Joplin 2.14.20 (prod, win32)

ID del Cliente: eee54006aa794fecb8a1c84835a1ee59
Versión de la Sincronización: 3
Versión del Perfil: 46
Llavero Soportado: Sí

Revisión: cfd98e3

Convert Text To New Note: 1.5.1
Note Link System: 0.8.0
Note overview: 1.7.1
Rich Markdown: 0.13.4
Suitcase: 0.3.2

Sync target

Dropbox

Editor

Markdown Editor

What issue do you have?

Hi,
I can't find a way to change the background color of the selected text.

Is there any rule or css class that can be edited for that?

Add this CSS to userchrome.css to change the background color of selected text:

div.CodeMirror-selected {
  background: #FF0000 !important;
}

Thank you very much @muzak, but this rule doesn't produce any change. I'm using the dark theme, with some modifications, could it be because of that?

Dark theme and your installed plugins should not be preventing this change. Is Tools > Options > General > Opt-in to the editor beta enabled?

If so, disable it so the rule works. If you don't want to, wait for someone else to find the editor beta CSS selector for it. I'm waiting for this myself.

If not or no change occurs, check your CSS for errors preventing following rules from triggering.

Otherwise, try modifying the selection in development tools to see if it works as expected.

The beta editor selection can be styled with CSS similar to the following:

.cm-editor .cm-selectionBackground {
    background-color: red !important;
}

See theme.ts for the default beta editor styles.

My Opt-in to the editor beta es disabled.

I'll check my CSS.

Thank you.

I was trying to move things around above the editor, so that the formatting icons and the "In: Notebook" button would end up on the same raw, to save some screen space. They seem to be placed in a div which has no class. I have tried a few :not and :has tricks without success. Does anyone have any hints?

P.s. I can do the green arrow bit in the picture, but not the orange one:

I just saw this thread today. I use a free Joplin plugin to change the background color of text similar to using a highlighter. You install the plug-in and reboot. Then when you're in the editor you need to switch to markdown format and on the menu will be a color palette that will let you change the color of the text and or the background.

Go to options and then plugins and install plugin called text colorize. It lets you easily apply Color to text.