Open KraXen72 opened 1 year ago
hi, i replaced that data.json /w the above code, but nothing happens.
i am already on latest obsidian and highlightr plugin, anything i may missed? thanks
did you also apply this css snippet? the data.json should only be what is in the first line, the minifed json. this:
{"highlighterStyle":"rounded","highlighterMethods":"css-classes","highlighters":{"r":"#bf616a","g":"#a3be8c","p":"#b48ead","b":"#81a1c1","aa":"#a5756233","o":"#d08770"},"highlighterOrder":["aa","r","g","b","p","o"]}
as for the rest, create a new snippet in vault/.obsidian/snippets
, for example highlightclean.css
, and paste all of the code in my first message in. Then go into obsidian > settings > appearance > refresh the snippets > turn on highlightclean.css
.
i am completely new so i only replaced the data.json
never used css
will try thx
On Sun, 8 Jan 2023, 04:49 KraXen72, @.***> wrote:
did you also apply this css snippet? the data.json should only be what is in the first line, the minifed json. this:
{"highlighterStyle":"rounded","highlighterMethods":"css-classes","highlighters":{"r":"#bf616a","g":"#a3be8c","p":"#b48ead","b":"#81a1c1","aa":"#a5756233","o":"#d08770"},"highlighterOrder":["aa","r","g","b","p","o"]}
as for the rest, create a new snippet in vault/.obsidian/snippets, for example highlightclean.css, and paste all of the code in my first message in. Then go into obsidian > settings > appearance > refresh the snippets > turn on highlightclean.css.
— Reply to this email directly, view it on GitHub https://github.com/chetachiezikeuzor/Highlightr-Plugin/issues/61#issuecomment-1374607568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI6PKYI3KZHWP5ZWK43BLN3WRHJEZANCNFSM6AAAAAATEZYWJI . You are receiving this because you commented.Message ID: @.***>
did you also apply this css snippet? the data.json should only be what is in the first line, the minifed json. this:
{"highlighterStyle":"rounded","highlighterMethods":"css-classes","highlighters":{"r":"#bf616a","g":"#a3be8c","p":"#b48ead","b":"#81a1c1","aa":"#a5756233","o":"#d08770"},"highlighterOrder":["aa","r","g","b","p","o"]}
as for the rest, create a new snippet in
vault/.obsidian/snippets
, for examplehighlightclean.css
, and paste all of the code in my first message in. Then go into obsidian > settings > appearance > refresh the snippets > turn onhighlightclean.css
.
hey thx your reply and help, yet i found that highlightr somehow don't work well the way i think.
finally i use the theme "minimal" /w it's plugin "style settings", to turn all default text as magenta, and highlight color as blue. in this way i can have magneta text + blue background for using green filter to "anki" the things.
i tried using minimal for text, then highlightr for highlight but not working, so i figured out the above way.
thanks for help anyway.
Thx for sharing code, really saves my life.
I tried to replace the label <mark>
in main.js with label <font>
, and spend like 3 hrs checking, debugging but seems doesn't work. Really appreciate for your code.
thanks for share, i have try the css snippet, but it stll the same(background color), anything else i can do to fix it?
Would love this plugin merged with this one, haha: https://github.com/erincayaz/obsidian-colored-text
Would love this plugin merged with this one, haha: https://github.com/erincayaz/obsidian-colored-text
the implementation of Highliter plugin uses which is probably a better implementation than colored texts use of span. Should the color class not be available in the environment, the mark element will default to yellow.
text colored with colored text will not fall back.
Related:
I applied the minimal menu snipped and IT WORKED. Yayy! Something I didn't knew I wanted but now I never want to go back. Thank you @KraXen72 !
Somehow, the code does not work for me. All I want is just to replace the text color. Here is my way to do that.
Edit [vault]/.obsidian/plugins/highlightr-plugin/main.js
In the this.eraseHighlight
function, replace every "mark" with "font".
In the this.settings.highlighterOrder.forEach
function
replace every "mark" with "font".
replace "background" with "color".
I'm a newbie to obsidian and coding. I know my method is not perfect at all. Feel free to point out what can make it better.
slightly more destructive, but it will achieve what you want. note that it will break if a highlightr update ever comes out
Thanks for the reply. I'm now using Editing Toolbar 😂. Thanks for your code, though.
For anyone interested, i've decided to fork/rewrite this plugin and add this functionality. You can install it via BRAT for now. https://github.com/KraXen72/obsidian-painter
please, do give me feedback if you decide to test the plugin, here or on discord: kraxen72 and you can ping me in the Obsidian server. Thanks!
This issue is two feature requests, both should be added as a new setting into the plugin.
minimal menu:
change the highlighter menu to this minimal variant:
text color mode
makes it so that highlights don't change text background color, but actual text's color:
i have implemented both as a css snippet, feel free to use the code there to implement these features, but please do atleast mention my github username in the changelog if you decide to use my code.