All parameter and return types referenced below are exported from
@blokkli/editor. Import them for full type safety in your adapter.deleteBlocks({ uuids })
deleteBlocks({ uuids })
Enables the Delete toolbar action. blökkli calls this when the user selects one or more blocks and triggers the delete action (keyboard shortcut or toolbar button).SignatureExample
Array of UUIDs for the blocks to delete.
duplicateBlocks({ uuids })
duplicateBlocks({ uuids })
Enables the Duplicate toolbar action. Your backend must create copies of the given blocks with new UUIDs and insert them directly after their originals.SignatureExample
Array of UUIDs for the blocks to duplicate. Preserve the order when
creating copies.
updateOptions({ uuid, options })
updateOptions({ uuid, options })
Enables the Options panel sidebar. blökkli calls this whenever the user changes any option value for a block — text fields, toggles, selects, and so on.SignatureExample
UUID of the block whose options are being updated.
The full options object for the block, including both changed and unchanged
values.
updateFieldValue({ uuid, fieldName, value })
updateFieldValue({ uuid, fieldName, value })
Enables inline editable fields — block fields that the user can edit directly on the canvas (for example, a text block’s body content). Called each time the user commits a change to an editable field value.SignatureExample
UUID of the block containing the field being updated.
The name of the field being updated (e.g.,
'body', 'title').The new value for the field. The type depends on the field definition in
your block component.
getConversions({ uuids })
getConversions({ uuids })
Enables the Convert block type feature. blökkli calls this when the user opens the conversion menu for a selection of blocks. Return the available conversion targets.SignatureExample
UUIDs of the selected blocks for which conversion options are requested.
convertBlocks({ uuids, targetBundle })
convertBlocks({ uuids, targetBundle })
Performs a block type conversion. blökkli calls this after the user selects a target bundle from the conversion menu returned by Example
getConversions().SignatureUUIDs of the blocks to convert.
The bundle identifier to convert the blocks into.
Both
getConversions() and convertBlocks() must be implemented together for
the conversion feature to activate. Implementing only one has no effect.getTransformPlugins()
getTransformPlugins()
Enables the Transform feature. blökkli calls this on editor activation to discover which transform plugins are available. Transform plugins run server-side logic on a block selection — for example, merging text blocks or splitting a block by paragraph.SignatureExample
applyTransformPlugin({ pluginId, uuids })
applyTransformPlugin({ pluginId, uuids })
Applies a transform plugin to the selected blocks. blökkli calls this after the user selects a plugin from the transform menu.SignatureExample
The identifier of the transform plugin to apply (as returned by
getTransformPlugins()).UUIDs of the blocks to transform.
Both
getTransformPlugins() and applyTransformPlugin() must be implemented
together for the transform feature to activate.
