Javascript to add tags to a text area on a form?

K

katherine

Does anyone know a simple Javascript to add tags to a text area on a form.

On clicking a bold button for instance <strong></strong>

?

Any help appreciated, thanks,
kate
 
Y

Yann-Erwan Perio

katherine said:
Does anyone know a simple Javascript to add tags to a text area on a form.
On clicking a bold button for instance <strong></strong>

To do that, you'd use ranges, under the risk of getting malformed HTML
in the end; we've discussed this issue with Richard some time ago, you
might find the following thread useful (URL wrapped):

<URL>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&
th=57d63b74cc1d5495&seekm=d2d855ea.0301211618.1a092cdd%40postin
g.google.com#link11
</URL>


HTH
Yep.
 
K

katherine

Thanks very much Yep.

I have gone through the correspondance with Richard which was really
helpful.

I can't get the script to work with IE 5+ on a Mac though which is my
main objective.

Any ideas anyone??

Thanks very much,

K
 
T

Thomas 'PointedEars' Lahn

Yann-Erwan Perio said:
[...] (URL wrapped):

<URL>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&
th=57d63b74cc1d5495&seekm=d2d855ea.0301211618.1a092cdd%40postin
g.google.com#link11
</URL>

Please do not do this. Fortunately Mozilla/5.0 MailNews does not have
the OE bug that even URLs are wrapped, so do not try to impose that on
it. Leave them as they are and they stay functional hyperlinks in most
newsreaders.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top