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