You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I would like to customize the color of the highlighter via an API in the D2Reader instance, something akin to a changeHighlighterColor 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 the colorIcon icon in the toolbox.
My suggestion would be (and I would gladly open a MR myself) to add something like the following in the reader.ts file
This 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 the highlightIcon, underlineIcon and noteIcon in the TextHighlighter.ts file are painted.
The text was updated successfully, but these errors were encountered:
@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
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.The text was updated successfully, but these errors were encountered: