Open MooDySmiles opened 7 months ago
@MooDySmiles you can already change the highlighter color to other options. Please run the samples and you should see how that is done. if further questions, please provide more details why the extisting options do not work for you
@aferditamuriqi what I see from the examples is that I can change the highlight color among a predefined set of colors (shown in the image attached and defined in the initializeToolbox
function in the TextHighlighter.ts
file), which I would like to override with a set of colors decided by me
I looked for an API which would allow me to reach my goal but didn't find one
Any more follow ups?
Hi, I would like to customize the color of the highlighter via an API in the
D2Reader
instance, something akin to achangeHighlighterColor
function.Upon reviewing the code, I didn’t find anything that would allow me to choose a set of colours for text highlighting besides the one that’s hardcoded: the
highlight-toolbox-mode-colors
div accessible via thecolorIcon
icon in thetoolbox
.My suggestion would be (and I would gladly open a MR myself) to add something like the following in the
reader.ts
fileThis would address my specific use case. However, further work in the
TextHighlighter.ts
file could be done to reflect the change of the highlighter color, and subsequently, the color which thehighlightIcon
,underlineIcon
andnoteIcon
in theTextHighlighter.ts
file are painted.