@foxitsoftware/web-collab-client
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

Web Collaboration Client

Welcome to the API documentation for the web collaboration client, which is a client component of Foxit Web Collaboration Add-on.

Installation

Web Collaboration Client runs in a web browser and is available as a NPM package.

npm install @foxitsoftware/web-collab-client

Usage

import { WebCollabClient } from "@foxitsoftware/web-collab-client"

const client = new WebCollabClient({
  baseURL: "http://localhost:8080",
  pdfViewer: pdfViewerInstance,
  userProvider: () => {
    // The user information is up to the app level to provide and will be applied in the collaboration client module.
    return {
      id: 'some-user-id-from-user-app',
      username: "some-user",
      token: "user-token" // The token is used for authentication, token validation should be implemented on server side
    }
  }
})

// create a collaboration for a pdf doc
const collaboration = client.createCollaboration({
  fileUrl: 'http://path-to-your-pdf-file.pdf',
  isDocPublic: true,
  docName:'path-to-your-pdf-file.pdf'
})

// begin collaboration session
collaboration.begin()

Readme

Keywords

none

Package Sidebar

Install

npm i @foxitsoftware/web-collab-client

Weekly Downloads

42

Version

1.3.0

License

Commercial

Unpacked Size

123 kB

Total Files

4

Last publish

Collaborators

  • cheng_lin
  • jianxin_yang
  • xuexing-he
  • tianwei_wu_foxit
  • hong_lin
  • albanomoura
  • rowanhanna
  • xinqiang_song
  • lzw4x
  • yongliang_huang
  • jim2018
  • foxitsdk
  • foxitniu
  • cancerq
  • linc0803
  • web-sdk-ci
  • webviewer
  • warerwang
  • zhiquan_ye
  • y1j2x34