Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

A UI question, I think

What exactly is happening when I switch from Normal to HTML view? Is there some sort of code-fixing that goes on when I switch from one to the other?

I ask because today I was working in HTML view and (obvious now) had pasted something incorrect into the window... I believe I had two sets of HTML and BODY tags. When I switched to Normal view, it was just a blank screen, but when I switched back to HTML view, all the code was gone and just a default blank page was in HTML source.

I should have been more careful about my pasting, but I didn't realize some sort of interpretation was going on when I switched from one to the other (I thought they were different views of the same code, without changes).

Chris Shieh
Thursday, December 06, 2001

When you switch from HTML to Normal mode, we take all the HTML text and shove it into the WYSIWYG editor. That editor does it's best to display HTML no matter how bad it is but some things (especially multiple <HTML> tags) are just too much for it to deal with and it fails to load anything.

Then when you switch back to HTML mode, we ask the WYSIWYG editor for the HTML text, which, in this case, consists of nothing since it failed to load, so the HTML window goes blank too.

In this case we don't save your changes to the database, so you should just close the window without saving changes and reopen it.

Joel Spolsky
Thursday, December 06, 2001

By the way, I think the normal view is one of the best WYSIWYG HTML editors I've seen to date. DreamWeaver is pretty good too, but that about rounds out the entire list.

Kudos.

Maury

Maury Markowitz
Thursday, December 06, 2001

Aah, that explains why my content's HTML degrades when I keep switching back and forth. :/

Reproducable horror:

* Create a new article.
* Create four bullet points.
* Switch to HTML. Observe </LI> tags.
* Switch to Normal and back to HTML. They're gone.

I presume fixing this is hard work. :/

Garth Kidd
Sunday, December 09, 2001

Yes, it's hard work, because it's a Microsoft component to which they have no source code. There has been mention in the past[1] of "cleaning up" the resulting output of the WYSIWYG editor. I presume that means tossing out the Microsoft component and rolling their own. It's a minor annoyance to me, because I pride myself on using XHTML for my entire site -- except my CityDesk maintained bits, unfortunately.

[1] http://discuss.fogcreek.com/citydesk/default.asp?cmd=show&ixPost=594

Brad Wilson
Sunday, December 09, 2001

We'd still use the Microsoft component, we just wouldn't trust it to generate the HTML -- instead we'd "walk the DOM" (basically looking inside the components own data structures) and generate an XHTML representation of what we find there.

I'm not sure yet that this will work.

Joel Spolsky
Sunday, December 09, 2001

*  Recent Topics

*  Fog Creek Home