[thelist] JS for creating html styles/links

Peter-Paul Koch gassinaumasis at hotmail.com
Tue Feb 25 08:16:00 CST 2003


>I'm figuring there has to be lots of JavaScripts available that will
>allow non-html-savy people to insert <strong> <em> <a> <p> <hx> tags, etc
>into <textarea>s. I've seen a few good ones that were Active-X controls,
>and one Flash one that was excellent: looks like a
>mini-version of Word. But don't want to go that route. Want
>DOM-compliant JavaScript! Would do it myself, but am coming up with a quote
>and am seeing I need to efficiently cut corners.

It's surprisingly difficult to write a cross-browser script for this. As far
as I know it's not possible, for instance, to find the cursor position in
the textarea in Mozilla.

So in my experience it's not possible to write a cross-browser script. As to
an IE-only JavaScript, why bother when there are already components that do
what you want? 'DOM compliant' is very relative in the respect: for any IE
compatibility whatsoever you must use a whole bloody lot of MS-proprietary
stuff.

My advice is to either use the ActiveX scripts (which of course will only
work in IE Windows) or forget all about it.

--------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.xs4all.nl/~ppk/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
W3C DOM Compatibility Table, expanded & updated
http://www.xs4all.nl/~ppk/js/index.html?version5.html
--------------------------------------------------


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail




More information about the thelist mailing list