Skip to content

legalesign/ls-document-viewer-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Sample HTML for Legalesign Document Viewer

The following is a simple use case for the COMPOSE mode of the Legalesign Document Viewer, we have used the button slot feature to show you where these will appear, but if you don't want them, or you're handling that elsewhere in your UI, simply omit them entirely.

Setup

You'll need to generate an authentication token, a templateid and run the page through a service like (Live Server)[https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer].

Get Token

We suggest running the node code legalesign-graphql-tutorial or checking one of the samples in (https://apidocs.legalesign.com/docs/graphql/oauth2/setup/).

Get a Template ID

Sign into Legalesign Console (https://console.legalesign.com/) and upload a PDF to use as a template, edit the template and note the ID in the URL:

https://console.legalesign.com/template/XHBsMWRjNWJmMzUtNTVjZS0xMWYwLWJiYjUtMDZlNDc2YTA3NTY/edit

where XHBsMWRjNWJmMzUtNTVjZS0xMWYwLWJiYjUtMDZlNDc2YTA3NTY would be the template ID you need. If you're more familiar with the GraphQL API you can easily list the templates and their ids directly.

Substitute these items into the test.html file and run it to see the template with the dummy recipients provided in the JSON.

Test and Send

A more advanced example is provided in testandsend.html which shows how to use the Legalesign Document Viewer. Note that this will send documents - so be aware that there may be some minor cost.

:::Important - Use safe test contacts in your recipients JSON as these WILL recieve emails. You can often use your own email address with the username suffixed by a '+' and some random letters to make more test email addresses, alex+test1@legalesign.com for example.

About

Example vanilla/javascript version of Document Viewer UI component.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages