Skip to content

EditorView.posAtDOM method

EditorView › posAtDOM

Official

Find the document position at the given DOM node.

Signature:

posAtDOM(node: Node, offset?: number | undefined): number

Parameters:

ParameterTypeDescription
nodeNodeThe DOM node.
offset?number | undefinedThe offset within the node.

Returns: numberThe document position.