stefanopagliari / bibnotes

358 stars 30 forks source link

Output produces different colored highlights as yellow highlights #135

Closed wjfeeney closed 2 years ago

wjfeeney commented 2 years ago

My highlights are in different colors. After using BibNotes Formatter: Create/Update Literature Note, all my different colored highlights appear as yellow highlights in the Literature Note. Can you fix your plugin so that the output reflects my highlights in the colors used? Thanks.

Mauricioc93 commented 2 years ago

Hi, I am having the same issue. I would appreciate any help with this. Thanks for all your effort Stefano, the plugin is great.

stefanopagliari commented 2 years ago

@wjfeeney and @Mauricioc93. This is a feature that I would like to include in the future. I think that in theory you could already achieve this by adding to the "colour" settings an html tag to colour the imported text with a given colour. I have not tried it myself but it should be feasible

Mauricioc93 commented 2 years ago

Thank you @stefanopagliari for the prompt reply. I realised later that the feature was not included yet. I would like to help with the feature implementation, but I am just getting into Obsidian. If you think it is an easy implementation then maybe it could be a way to start.

stefanopagliari commented 2 years ago

The following html tags work to highlight the text (in this case "Test") in the colour indicated in the tag <mark style="background: #FFB8EBA6;">Test</mark>

I think you can implement something similar in Bibnotes by specifying the setting for a given colour to be like this:"

<mark style="background: #HEXCODEOFTHECOLOUR;">{{highlight}}</mark>

I have not tested this, but it should work. Later I should be able to implement this in the code as an option

Edilson-R commented 1 year ago

What is the color palette? I don't know what the hex code is for the other colors.