Skip to content

gi-nx


gi-nx / exitBlockEditMode

ts
function exitBlockEditMode(save?: boolean): boolean;

Closes the block editor, writing the edited features back to the block definition when save is true and discarding them otherwise.

Parameters ​

ParameterTypeDescription
savebooleanWhether to save the edits into the block definition. Defaults to true.

Returns ​

boolean

True once closed, false if a save was rejected (e.g. the block grew too large) — the edit is left open at the level that failed.

Needs Permission ​

Throws ​

If no block edit is in progress.

Example ​

ts
await rpc.invoke("exitBlockEditMode", [true]);