mountFlowDropApp()
Mounts the full FlowDrop application (sidebar, editor, config panel) into a container.
Options
mode option controls canvas interaction: 'edit' (the default) allows editing; 'readonly' and 'locked' disable all canvas interaction.
How instance ids and draft keys work
How instance ids and draft keys work
When you omit
instanceId, the first mount on the page becomes the default
instance (id default); additional mounts get auto-generated ids (fd-1,
fd-2, …). Every instance scopes its draft and panel storage keys by id
(flowdrop:draft:<id>:…).Pass an explicit instanceId whenever you mount more than one editor with
drafts enabled, so the keys stay stable across page loads.Feature flags (FlowDropFeatures)
FlowDropEventHandlers and FlowDropFeatures.
Return value
instance is the state container — workflow, history, playground, interrupts,
categories, and the rest. Call into it to drive the editor programmatically,
e.g. app.instance.workflow.addNode(...) or app.instance.history.undo().
Call
clearAllDrafts() on logout.Otherwise drafts persist across user sessions on shared devices. It clears the
configured draft storage (localStorage unless changed via the draftStorage
option).mountWorkflowEditor()
Mounts just the editor canvas — no navbar, no sidebar. Useful for embedding a minimal editor.
MountedFlowDropApp interface as mountFlowDropApp(). instanceId follows the same default-instance semantics as mountFlowDropApp() above.
mountPlayground()
Mounts the interactive playground for workflow testing.
instanceId follows the same default-instance semantics as mountFlowDropApp().
Live polling is page-global.Playground state (sessions, messages, interrupts) is isolated per instance, but
only one playground can actively poll at a time. Drive a non-polling playground
via
pushMessages() instead.Playground return value
unmountFlowDropApp() / unmountPlayground()
Clean up a mounted instance. Equivalent to calling .destroy() on the returned object.
Lifecycle
- Mount — Call
mountFlowDropApp()with a container element - Interact — Use the returned API to control the editor programmatically
- Destroy — Call
.destroy()or the unmount function to clean up
getInstance() inside the component tree, or the mount handle’s .instance outside it.
Why registration works after mount
Why registration works after mount
Each registry tracks a version counter that invalidates dependent reactive
reads. When you register a node or field after mount, that counter bumps and
the editor re-resolves, so late registrations take effect.