I am working on a script that displays users on the screen (when they physically select text in the browser) and should manipulate that text.
This is what I am trying to do.
Take the selected text, find the selected text in the source line and then wrap the text that is in the source line with a specific HTML tag ( <b>, <span>, <a>)
I am using jQuery.textselect plugin .
The part that I cannot understand is how to manipulate the source text after the user selection is found.
Example: If this text is displayed on the screen: "HELLO WORLD"
The source text is HELLO WORLD, the user selects HELLO, then the script searches the source text to select the user and transfers the HELLO with tags <b>, and then displays the new original text ... it makes sense
Sorry for the confusion and thanks for the help!
source
share