Yeah, I see that now. I tried this way by myself and it works in preview. Now got to find a way to make it work in editor. Thanks.

Thanks for your help. Does this work in edit mode for you? I tried it and cannot make it work in editor.

Yes it works for me (but unresolved links in edit mode can’t be styled as shared in a FR)

Okay. Don’t know why it wont work for me. :confused:

Maybe it conflicts with a theme?

I am in default theme.

I don’t really know anymore :thinking:

I actually tried it with two vaults in default theme and they both worked. The only reason it won’t work is if the note doesn’t exist :upside_down_face:

It just bad luck I guess :grinning_face_with_smiling_eyes: Thanks for your help anyway.

1 Like

@DEV_Scribbles I’m in same position: the code for edit mode doesn’t work.
This could be a newbie question, but where do you find the attribute selector “data-link-data-href”? There’s any chance that attribute is given by any plugin?

ooh probably! lemme check

It looks like it’s from Supercharged Links plugin

Ok. It makes more sense because I didn’t found any particular attribute.
Supercharged is unknown for me. I’ll check it.
Thanks.

Supercharged LInks has included an option to see changes in edit mode. But that hasn’t worked for me either.

i found i had to reload the app for the changes to apply

For me, even reloading the app does’nt work. It works in the preview mode only.

Screenshots will probably help here! Maybe show the snippet you’re testing too.

.cm-hmd-internal-link[data-link-data-href*=“CLM”],
.markdown-preview-view a[href*=“CLM”] {
color: salmon !important;
}

.cm-hmd-internal-link[data-link-data-href*=“CLM”]::before,
.markdown-preview-view a[href*=“CLM”]::before {
content: ":mag_right: ";
}

This is the most promising snippet that i have tested so far. Thanks to @DEV_Scribbles .

Unrelated to the above, I would like to tell that I have been able to achieve the the following results

using this code

.cm-tag-important, div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-tag-important {

background-color: red;

border: none;

color: white !important;

font-size: var(–font-size-tag);

text-decoration: none !important;

cursor: pointer;

}

.cm-tag-important:hover {

color: white;

background-color: var(–text-accent-hover);

}

.cm-tag-obsidian, div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-tag-obsidian {

background-color: #4d3ca6;

border: none;

color: white !important;

font-size: var(–font-size-tag);

text-decoration: none !important;

cursor: pointer;

}

.cm-tag-obsidian:hover {

color: white;

background-color: var(–text-accent-hover);

}

.tag[href^="#obsidian"] {

background-color: #4d3ca6;

}

.tag[href^="#important"] {

color: white;

background-color: red;

}

So, maybe there is a work around for internal links too.

Update : I have got the css given by @DEV_Scribbles to work in editor mode too. I don’t know why it suddenly became active. I am trying to find out. One thing I did was to open a vault in my external HDD rather than on a Google Drive synced folder, as I was doing before.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.