setContextNodeIdToSelectionCommonAncestorElement

How to get setContextNodeIdToSelectionCommonAncestorElement

Depend on fontoxml-base-flow to make this transform available.

Deprecated

This API has been deprecated.

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

Example:

"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'

Was this page helpful?