| mikezilla.com

Quote Selected Text


[ie, gecko]

Sometimes it would be nice to be able to select part of a another persons comment and quote it when creating your own comment.

This example shows how to do that using Javascript.
To use this select some of this text with your mouse and press either the insert or replace button. Insert will insert the selected text at the last position of the cursor within the textarea. Replace will replace the content of the textarea with the content of the selection.

N.B. "Insert Quote" ONLY works in Internet Explorer. Gecko does not support insertion of text within a textarea.



© Mike Golding 2003 [21/01/03]