React cloud editor
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
Parameter | Description |
---|---|
reportSecret |
Access token for a report. |
editorKey |
Access token for editor. |
lang |
Editor language. Possible values: en (default, uses metric units) and en-us which uses imperial units. |
value |
ReportCloudData from customer's database. |
onChange |
Callback when value changes. |