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:

Parameter Type Description
node Node The DOM node.
offset? number | undefined The offset within the node.

Returns: numberThe document position.