1.0.0-beta.2 • Published 1 year ago

@pantherpdf/cloud-editor-react v1.0.0-beta.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

PantherPDF Cloud Editor React component

PantherPDF is a report editor and PDF generator service for creating customized PDF reports.

This package is a thin wrapper around a cloud based editor for simplified integration into React apps. There is also a Vue and Angular wrapper.

Underlying editor is open source and available here.

Installation

npm install --save @pantherpdf/cloud-editor-react

Example using reportSecret:

Report data is stored on PantherPDF database.

import CloudEditor from '@pantherpdf/cloud-editor-react';

export function EditorPage()
{
  return (
    <CloudEditor
      reportSecret="..."
      style={{ width: '100%', height: '95vh', border: 'none' }}
    />
  );
}

Example using value:

Report data is stored on customer's database.

import { useState } from 'react';
import CloudEditor, { ReportCloudData } from '@pantherpdf/cloud-editor-react';

export function EditorPage()
{
  const [report, setReport] = useState<ReportCloudData>(null);
  return (
    <CloudEditor
      editorKey="..."
      value={report}
      onChange={setReport}
      style={{ width: '100%', height: '95vh', border: 'none' }}
    />
  );
}

Props

ParameterDescription
reportSecretAccess token for a report.
editorKeyAccess token for editor.
langEditor language. Possible values: en (default, uses metric units) and en-us which uses imperial units.
valueReportCloudData from customer's database.
onChangeCallback when value changes.

License

MIT

1.0.0-beta.2

1 year ago

1.0.0-beta.1

1 year ago