Open SyncroIT opened 1 year ago
Installed the fork, works like a charm !
Seems like it would also fix #60, #51; but unsure if it solves #22 🤔
throws an error "failed to load highlightr plugin" for some reason for this fork.
The original plugin for some reason changes the font color to black in dark mode and messes everything up. Unable to use the highlighted text in blocks or internal links (almost invisible texts)
THIS IS AMAZING!! Worked like a charm ♥♥
If you used the built in installer:
Hopefully this helps others who are less code savvy like me.
Or you can just create a CSS file in your snippets directory vault/.obsidian/snippets/fix-highlighter-text.css
with the contents:
mark {
color: inherit;
}
Or you can just create a CSS file in your snippets directory
vault/.obsidian/snippets/fix-highlighter-text.css
with the contents:mark { color: inherit; }
The fork doesn't work for me with minimal theme, and this snippet works but only in reader mode, not in preview. Any idea about what I could do?
@AMGMNPLK
try
1
/* Sets the text color of all highlighted elements to theme font colour */
.markdown-preview-view mark[class^="hltr-"],
.cm-s-obsidian mark[class^="hltr-"] {
color: inherit !important;
}
⚠️ And make sure you switch the highlighting method to "css-classes" in the settings of the Highlightr plugin for the snippet to work its magic. Once you've done that, you'll see your text shining bright white over the colorful highlights – in both preview and editor mode!
Thanks @florenciagithub , but I want it with black text, because it has better contrast with the highlighting. How should I do it?
I'm using minimal theme and the plugin style settings.
Thanks @florenciagithub , but I want it with black text, because it has better contrast with the highlighting. How should I do it?
I'm using minimal theme and the plugin style settings.
@AMGMNPLK Try changing 'inherit' to 'black'.
I might be doing something wrong.
Do you say that I should create a snippet with this:
/* Sets the text color of all highlighted elements to theme font colour */
.markdown-preview-view mark[class^="hltr-"],
.cm-s-obsidian mark[class^="hltr-"] {
color: inherit !important;
}
Or that I should add it in the main.js of the plugin? If that, where?
Just added a CSS rule in the stylesheet that makes the text inherit the color from the theme.