1
Get the Velt client
Import the
useVeltClient
React hook.You can use this hook within your component to fetch the Velt client.React
2
Create a useEffect hook
Create a
useEffect
hook with the client as dependency.React
3
Enable Rewriter
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.React
4
Test Rewriter
Test out
Rewriter
by highlighting some text.