Previous Code Entry
Left Arrow
Use the tab key in a textarea
Current Code Entry
Go Back To Code List
[How-To]
Insert text from 2 inputs into a TextArea a cursor position
Article Entry Date: October 31,2022 @ 09:01:11 / Last Updated On: October 31,2022 @ 03:05:44
BBCode editor allows you to select specific text from a textarea, have that text inserted into an Input field, and then add a URL string back to the textarea.
This code can be used in forum-type websites, making adding URLs to your visitor's posts easy.

Origins
  1. September 02, 2010 - Originally posted and shared with the Coding Source Community.
  2. June 20, 2012 - Updated form elements and code
  3. October 31, 2022 - Updated with Selected text in Textarea.
    Original code source to Selected text (javascriptkit.com«)
    To work with an [Input] field instead of DIV, code provided by: Michel Plungjan«