How to merge the contents of the input box with the dom element in draft-js

what you want to achieve is to enter text in draft-js, click an icon, add @ string immediately after it, pop up the list of candidates, @ and the name of the person are two span tags, the input content of draft-js has been converted by stateToHTML (contentState), and there is a variable in state. How to get this variable and span tag now, getting id will report an error with innerHTML, ask for a great answer, and thank you

.
Menu