For example, some text has a link mark and strong mark, the strong mark will cause the link mark split into several marks, although there is only one ‘a’ dom node. so how to get the whole text content of this link
Marks are not like nodes. They can’t be ‘split’.
Have a careful read of the document model: ProseMirror Guide
You probably want to use the Node API to iterate the children of the parent node, collecting the adjacent nodes that have the same link mark on them.
This thread is related and would be a good starting point: Expanding the selection to the active mark? - #2 by marijn
Thank you! This looks like what I need.