[thelist] Yahoo! like HTML textarea

.jeff jeff at members.evolt.org
Mon Aug 6 13:53:52 CDT 2001


aardvark,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: aardvark
>
> > > http://www.amazon.com/tracking
> >
> > are you referring to the source of the "content" area
> > of the page above?
>
> no.
>
> i am a complete and utter baffoon.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

well, i still suspect the "content" area at the address above was entered
using some sort of editor like what we're discussing.  i've seen *far* too
much of the sort of html it produces to not suspect the bit i pasted here.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> http://www.aspalliance.com/Yusuf/Article10.asp
>
> despite my bad post, your reply is spot-on...
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

thanks.  i've been working with this thing *far* too long to have not
encountered all the issues with it (and believe me, there are alot of them).

fwiw, the version mentioned above is also ie5.0 and older only.  it will not
work in ie5.5 or newer.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> but there are cases where running those routines on
> data going into a CMS can noticeably slow performance,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

yes, but getting that hit once when you insert the data is far superior to
a) getting that hit every time you display it or b) allowing that shoddy
html to be output to the end-user.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> and unless you account for everything, it can get
> pretty bad...
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

agreed.  that's why i said it would be alot of work to get it right.  it's
something i personally haven't decided to undertake.  alot of effort's gone
into just building the editor itself.  there's still alot of work if we want
to store the html as valid html4.01 or xhtml.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> plus, you want your code in the 'view HTML' mode in those
> tools to look like it does in the db, and if your doing
> a server-side conversion, it'll look different... similarly,
> if you pull clean code out of the db into the tool, the
> MSHTML engine eats it, so it looks like it never happened...
> this can be somewhat confusing for those users who are
> comfortable getting into the HTML...
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

yes, i agree completely.  however, what you're asking it to do simply can't
be done.  there's no way to tell the mshtml engine to parse the document at
runtime and create an internal copy of the html in the same format as the
original.  it just can't do that.  it parses the document, creates its own
internal copy complete with odd capitalizations, some attribute values
unquoted, adding in tags like <thead>, <tbody>, etc.

to do what you want to do one would have to write all their own event
listening functions to trap key commands (ctrl+b, ctrl+i, etc.), massaging
data when certain events happened (like converting web and email links when
pasting), etc.  you'd lose the "feature" of being able to paste
html-formatted content from one browser window, word doc, excel file, html
email window, etc. to the editor and have it retain most or all of the
formatting.

thanks,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thelist mailing list