I have a textarea where the user can write a paragraph. I want to be
able to let them highlight some of their text and then hit a “URL”
button which will insert “[LINK]” before the highlighted text and
“[/LINK]” after the text.
I have a textarea where the user can write a paragraph. I want to be
able to let them highlight some of their text and then hit a “URL”
button which will insert “[LINK]” before the highlighted text and
“[/LINK]” after the text.
While it’s going to be a little bit of overkill you can check out our
Textile Editor Helper plugin to learn how to do what you’re asking.
The javascript is pretty simple and straightforward.