JavaScript SDK for embedding HTML pages within SeaTable Universal Apps.
npm install seatable-html-page-sdk


SeaTable HTML Page SDK is a JavaScript library designed for embedding HTML pages within SeaTable Universal Apps. It provides commonly used interfaces for data interaction and event subscription.
Install with npm or yarn:
``bashnpm
npm install seatable-html-page-sdk --save
$3
Using unpkg CDN:
`html
`Usage
$3
#### Development mode (mock)
For local development:
`js
const sdk = new HTMLPageSDK({
server: "your-html-page-server",
accountToken: "your-account-token",
appUuid: "your-app-uuid",
pageId: "your-app-page-id", // create an html page in universal app first
});
await sdk.init();
`#### Production mode (iframe)
When running inside a SeaTable Universal App:
`js
const sdk = new HTMLPageSDK();
await sdk.init();
`$3
`js
import { HTMLPageSDK } from "seatable-html-page-sdk";// Initialize SDK
const sdk = new HTMLPageSDK(options);
await sdk.init();
// list rows
const rows = await sdk.listRows({
tableName: "TableName",
start: 0,
limit: 100,
});
// Add a new row
await sdk.addRow({
tableName: "TableName",
rowData: { Name: "John", Age: 30 },
});
`Testing
$3
`bash
npm test
`$3
`bash
npm run test-cov
`Development
$3
`bash
npm run build
`$3
`bash
Check code style
npm run eslintAuto-fix issues
npm run eslint-fix
``