Find parent element of string in Javascript

后端 未结 3 1788
醉话见心
醉话见心 2021-01-28 17:05

I\'m attempting to find a specific string in a document which potentially can have the text split by other tags (i.e. "< p > This is an < span > example < /s

3条回答
  •  有刺的猬
    2021-01-28 18:04

    Use padolsey's findAndReplaceDOMText tool and pass it the replace option so that it returns the node you're looking for.

提交回复
热议问题