examples
examples copied to clipboard
Feature Request - Highlight plugin accept ReactElement
trafficstars
Hi,
First of all, product is great and we've bought a license. We're now adding the ability for users to be able to add comments/notes with the HighlightPlugin. It would be great if the render... fields we pass to the highlightPlugin accepted ReactElements instead of a function that returns ReactElement as this would allow us to use hooks and what not in these elements.
I currently get this error trying to use hooks in these functions:
Cheers, Leo
@phuocng
Perhaps this would fix it?
export interface HighlightPluginProps {
renderHighlightTarget?: React.ReactElement<RenderHighlightTargetProps>;
renderHighlightContent?: React.ReactElement<RenderHighlightContentProps>;
renderHighlights?: React.ReactElement<RenderHighlightsProps>;
trigger?: Trigger;
}