useVeltClient
React hook.You can use this hook within your component to fetch the Velt client.useEffect
hook with the client as dependency.Rewriter
is not enabled by default.Within the useEffect
hook, call client.getRewriterElement()
and then enableRewriter()
on the returned object to enable Rewriter
.Now when a user highlights text on your website, the Rewriter
tool will pop up.Rewriter
by highlighting some text.