How can I get the user selected text(just inside textarea) and apply actions to it something like wrap the selection [#bold]selected text[/bold]
.
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
Building off what Soufiane posted, here's the code translated to jquery with the ability to pass in the open and close tags:
Usage would then be like so:
This function may help you to do what you want with some tweaks. I found it here.