setContextNodeIdToSelectionCommonAncestorElement

Type: Transform step

Deprecated!

use setContextNodeIdToSelectionAncestor with XPath

Set the contextNodeId to the root element of the given stencil or null if we can't find the ancestor.

Example:

Other

"do-something": {
  "label": "Do Something(r)",
   "steps": [
     {
       "type": "transform/setContextNodeIdToSelectionAncestor",
       "data": {
         "selectionAncestorStencil": [
         	"p",
         	{
         		"class": "matchingAncestor"
         	}
         ]
       }
     }
   ]
}

This makes the operation 'do-something' set stepData.contextNodeId to the first 'p' in the ancestry with class 'matchingAncestor'