Skip to content

How do I get the children nodes of a LexicalNode? #3191

Answered by acywatson
6peterlu asked this question in Q&A
Discussion options

You must be logged in to vote

Only ElementNodes can have children. ElementNode is a subclass of LexicalNode, like TextNode or DecoratorNode. If you have a LexicalNode, you might need to refine the type with something like if ($isElementNode(node)) {...} and then access node.getChildren.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 6peterlu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants