postMessage protocol. The @feedal/content-type-sdk package provides a minimal bridge so you don’t have to implement the protocol yourself.
Security model
Community plugin UI never runs in the Feedal origin. Your bundle is loaded in an iframe withsandbox="allow-scripts" only:
- No access to the parent page’s DOM, localStorage, or cookies
- No cross-origin network requests from the iframe (except to your own CDN for the bundle itself)
postMessageis the only communication channel between your plugin and Feedal
How it works
Installing the SDK
SDK reference
onRender(callback)
Registers a callback that fires every time Feedal sends a PLUGIN_RENDER message. Returns an unsubscribe function.
The RenderPayload passed to the callback:
| Field | Type | Description |
|---|---|---|
node | Record<string, unknown> | Full node object from the graph |
mode | "preview" | "interactive" | "readonly" | Current render context |
value | unknown | Current answer value (null if none) |
sendAnswer(value)
Sends the respondent’s answer to the host page. Call this when the user makes a selection or submits input. value can be any JSON-serialisable type.
signalReady()
Signals to the host page that your iframe has finished loading and is ready to receive PLUGIN_RENDER messages. Call this once, after your bundle is initialised.
sendSize(height)
Requests the host page to resize the iframe to height pixels. Call this whenever your content changes height to avoid scroll bars or clipped content.
Raw postMessage protocol
If you’re not using the SDK, here are the raw message types: Host → iframetype | Additional fields | Description |
|---|---|---|
PLUGIN_RENDER | node, mode, value | Render the question with this data |
type | Additional fields | Description |
|---|---|---|
PLUGIN_READY | — | iframe has initialised |
PLUGIN_ANSWER | value | Respondent submitted an answer |
PLUGIN_SIZE | height | Request iframe resize |
PLUGIN_ERROR | — | Fatal load failure |
Building your bundle
Your renderer must be a self-contained ES module bundle served over HTTPS. Therenderer_bundle_url in your manifest must point to this file.
<script type="module">. There is no HTML shell — your bundle is responsible for creating DOM elements and appending them to document.body.
Minimal example
Registering with the manifest
Add acontent_type extension point to your app manifest:
question_type_id becomes available in the studio’s Add content panel and in the form graph as "question_type": "plugin:signature-capture".
Testing locally
During development, simulate the postMessage protocol in a plain HTML file to test your bundle without a live Feedal account:src to a local server that serves your bundle.
Next steps
Developer portal
Submit your plugin for marketplace review.
Marketplace
Browse community and official plugins.