Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

findWrapping

Try to find a valid way to wrap the content in the given range in a node of the given type. May introduce extra nodes around and inside the wrapper node, if necessary. Returns null if no valid wrapping could be found. When innerRange is given, that range's content is used as the content to fit into the wrapping, instead of the content of range.

function findWrapping(
range: NodeRange,
nodeType: NodeType,
attrs?: Attrs | null,
innerRange?: NodeRange,
): {
type: NodeType;
attrs: Attrs | null;
}
[]
| null
;
§
findWrapping(range: NodeRange, nodeType: NodeType, attrs?: Attrs | null, innerRange?: NodeRange): {
type: NodeType;
attrs: Attrs | null;
}
[]
| null
[src]

§Parameters

§
nodeType: NodeType
[src]
§
attrs?: Attrs | null optional
[src]
§
innerRange?: NodeRange optional
[src]

§Return Type

§
{
type: NodeType;
attrs: Attrs | null;
}
[]
| null
[src]