Commenting module for Scribblelive Toolkit
npm install @scrbbl/scribblelive-toolkit-commentingThe ScribbleLive Toolkit Commenting Module allows you to post text and image comments on ScribbleLive streams.
Install Node and NPM from https://nodejs.org/en/download/
From the project directory run:
npm install
Then to setup the test project:
npm run build-test-project
Now you can open /test-project/dist/index.html in your browser and post some comments!
To create an instance of the commenting module:
``javascript
import Commenting from '@scrbbl/scribblelive-toolkit-commenting';
const commentingModule = new Commenting({ token: 'my-token' });
`
Post a text comment:
`javascript`
commentingModule.addTextComment({
auth: 'my-auth',
threadId: 123456,
content: 'This is a comment!',
})
Post an image comment:
`javascript``
commentingModule.addImageComment({
auth: 'my-auth',
threadId: 123456,
image: { }, // Image file
caption: 'This is an image caption!',
})