mcamac/react-text-annotate

Custom mark render function `renderMark` should be in documentation

Opened this issue · 1 comments

xJkit commented

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 commented

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.