react-text-annotate icon indicating copy to clipboard operation
react-text-annotate copied to clipboard

Custom mark render function `renderMark` should be in documentation

Open xJkit opened this issue 3 years ago • 1 comments

Thanks for this awesome library!

I meant to do some customization on the mark UI and just forked this library. I found out that there is a custom render function :

renderMark={props => (
                <mark
                  key={props.key}
                  onClick={() => props.onClick({start: props.start, end: props.end})}
                >
                  {props.content} [{props.tag}]
                </mark>
              )}

It is very useful for further customization, and it would be very nice to demo this example on the documentation.

Thanks a lot! Sincerely.

xJkit avatar May 26 '21 16:05 xJkit

After digging into the code base, I found out only the TokenAnnotation has the renderMark api.

Is there any plan to migrate this feature to the TextAnnotation component? Thanks.

xJkit avatar May 27 '21 13:05 xJkit