rough-notation icon indicating copy to clipboard operation
rough-notation copied to clipboard

Option to update text color when highlighted

Open wpinfusion opened this issue 1 year ago • 0 comments

I'm using rough notation for the first time, and I'm trying to add the highlight animation to my title. It works, but I have an issue.

Imagine my background is white, and my text is black. Now I want to highlight in black, but that will hide the text because it's black as well. Is it possible to add another argument for the text color so it can be set to white after/while animating?

e.g.:

const annotation = annotate(element, {
      type: 'highlight',
      color: '#000',
      text: '#fff',
});

wpinfusion avatar Jun 07 '24 11:06 wpinfusion