Closed Bug 178683 Opened 22 years ago Closed 21 years ago

implement a method to insert text into a textarea


(Core :: Layout: Form Controls, enhancement, P3)






(Reporter: mjl+bmo, Assigned: kinmoz)



spun off from bug 161431

the phpbb forum code and other things have buttons which insert text into
textareas. these page use proprietary script in IE, and there apparently isn't
an equivalent method in mozilla yet. there should be one.

ccing people that were just discussing this on IRC...

(apologies for the poor quality of this RFE - I don't know enough DOM/script
stuff to give more detail)
Blocks: 161431
Um.. this is a dup, no?  I swear I've seen this filed before...
Whiteboard: DUPEME
can't find a dupe and neither could bz, so ignoring bz because he said to... :)

might be worth mentioning the similar, but different, bug 163898 here though in
case it's relevant to an implementation of this...
Whiteboard: DUPEME
Note that the fix for bug 163898 will be checked in soon. The current
implementation puts the new "cmd_insertText" on the new PlaintextEditorController
and thus would not be available to textareas. If the command was put on the 
BaseController, it would be available to text widgets. But I think Kin had some
security concerns about doing this?
Priority: -- → P3
Target Milestone: --- → Future
I think this bug has been fixed. For Mozilla there is selectionStart,
selectionEnd and setSelectionRange().
I think it was a dupe for bug 88049:

Bug 88049 seems to have provided what is needed here.  See the testcase for
bug 190382 for example.

Closed: 21 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.