Skip to content

Type Editor


Type Editor / @type-editor/commands / toggle-wrap-in

toggle-wrap-in

Functions

FunctionDescription

toggleWrapIn

Creates a command that toggles wrapping of the selected content in the given node type.

If the selection is already inside a node of the specified type and allowUnwrap is true, the command will lift (unwrap) the content. Otherwise, it will wrap the selected block range in a node of the given type.