@papercups-io/storytime
Papercups screen sharing feature
Demo
Screenshot:
GIF:
Install
npm install --save @papercups-io/storytime
Usage
First, sign up at https://app.papercups.io/register to get your account token. Your account token is what you will use to pass in as the accountId
prop below.
Using in HTML
Paste the code below between your <head>
and </head>
tags:
<script>
window.Papercups = {
config: {
accountId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx',
customer: {
name: 'Test User',
email: 'test@test.com',
external_id: '123',
},
baseUrl: 'https://app.papercups.io',
},
};
</script>
<script
type="text/javascript"
async
defer
src="https://app.papercups.io/storytime.js"
></script>
:warning: Note that if you already have included the window.Papercups
configuration with the chat widget, you should NOT duplicate it here!
If you already have the config set, just include this script below it:
<script
type="text/javascript"
async
defer
src="https://app.papercups.io/storytime.js"
></script>
Using as an NPM module
Place the code below in any pages on which you would like to render the widget. If you'd like to render it in all pages by default, place it in the root component of your app.
import {Storytime} from '@papercups-io/storytime';
const st = Storytime.init({
accountId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx',
baseUrl: 'https://app.papercups.io',
});