Is it possible to add decorations to the content of sections?

Like this paragraph:

<p>aaaaabbbbbccccc</p>

Can it be decorated as:

<p>aaaaa<b>bbbbb</b>ccccc</p>

This is like highlighting a piece of content within a p tag, but adding a b tag to that content.

I am a newbie. If possible, I can try to describe the solution as much as possible.

thank you very much.

Yes, it is. See for example the lint example for how to use inline decorations, and use the nodeName to set the tag that should be wrapped around the content.

Thank you marijn for your guidance.

After reading the interface documentation, I found that it is relatively simple to implement. Work has now been completed.

In order to facilitate other people with the same needs, I list the key help page addresses, hoping to help others:

https://prosemirror.net/docs/ref/#model.Fragment.descendants

https://github.com/search?p=2&q=Decoration+DecorationSet+descendants&type=Code

good luck.