How to get a full list of allowed nodes at current position?

Is there an api to get a list of node types that are allowed at the current position, based on the schema and current content?

We are trying to show the user a dynamic list of rich-text nodes they can include depending on where the cursor/selection is set in the content. Think of the common modern example of hitting / on the keyboard, and then we want to show them a popup list of valid node types they can select from.

See ContentMatch and its edge and edgeCount properties.

1 Like