An editor for blocks of a specific language. Editors follow the Elm architecture - it defines a state together with events that can be triggered by actions in the user interface. The render function renders the current state as a Virtual DOM node and the update function calculates a new state when given an old state and an event.
Initialize the editor state for a given block with a given (unique) block ID
Render the block using the current editor state. The editor context that is also passed to the render function can be used to trigger events when the user performs some action (this triggers re-render of the page)
The update function takes an event (trggered by the event handlers returned in the rendered Virutal DOM nodes) together with the current state of the editor and produces a new state.
Generated using TypeDoc