]
This function is realized , but I feel a little unhappy because I have to use the HTML editor. However, from the code of the HTML editor, I noticed the createTextRange() method. This method has been used before, but I have never studied it in depth. In Msdn, I found that only objects such as Body and TextArea support the createTextRange() method. I continued to check it carefully in msdn. CreateTextRange() returns a TextRange object. I continued to check the TextRange object and found that it has many methods. I gave it a try first. findText method, I found that only text can be selected, but objects cannot be selected. I continued to search, and finally found that moveToElementText is the method we are looking for:
If you need to introduce external Js, you need to refresh to execute ]