Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 675 Bytes

editable-blocks.md

File metadata and controls

20 lines (17 loc) · 675 Bytes

Editable blocks

Some blocks might be static or only generated from link unfurling, but most blocks are designed to be editable by the user. Editable means that the user can interact with the blocks to change its properties.

Updating the properties of a block is done through a @editor.node.updateProps action:

<block>
    <textinput state="content" />
    <button
        label="Edit"
        onPress={{
            action: '@editor.node.updateProps',
            props: {
                content: element.dynamicState('content')
            }
        }}
        />
</block>