WYSIWYG CMS – The other user agent

Differences in rendering of a design in a browser and a WYSIWYG editor

Content management systems with WYSIWYG editors have issues with some templates using CSS for layout – effectively forcing the designer to cater both for the CMS and the final browser. This post proposes the idea of an editor style sheet to overcome these problems.

Good web developers should have realised by now that there are a lot of different user agents out there and the web does not only consist of Internet Explorer 6 users on Windows XP with a resolution of 1024×768 pixels. Therefore we test on different browsers and settings – as defined in the project scope document. Most of the time this does involve MSIE 6 and MSIE 5.5, if we are lucky even Firefox and maybe Safari. Personally I tend to develop on Firefox and then fix MSIE glitches and do some sanity testing on Safari and the newest Opera flavour. Lately however, I realised that we are likely to forget another user agent – for another user group – the content management system.

Why WYSIWYG editors sell

Content Management systems come in several flavours: Those that offer complete WYSIWYG editing, those that offer hybrid editing (text boxes inside a template) and those that strictly separate editing from viewing. The problematic ones are the first two – but those are also a lot more usable for editors.

Editors are not necessarily versed in the ways of the web and won’t realize that their texts are far too long and long-winded until they see them in the site’s styles and furniture. They can do that in CMS that are completely separated– all of them offer a preview in one way or another – but that does not give the same feeling as directly writing in the style (or most likely amending a pasted text) gives you.

Therefore CMS with a full fledged WYSIWYG editing facility inside the template are easier to sell than ones that restrict the editors – after all what editors need to do is edit texts and publish them – they are not interested in semantics or how a web site is structured – to them the web is a writing pad. If it looks like Word, it has got to be good.

Technical hurdles

The technical implementations of WYSIWYG CMS vary a lot, but one thing is common – the display is just not the same as it is in a browser. Some of them have painfully outdated rendering engines that show bugs that even the CSS hacks won’t fix. This is not really a big issue from a design point of view – nobody gets hurt when there is a pixel shift – but it can be a real problem when our painfully designed and planned CSS layout falls to pieces once the user hits the edit button. All WYSIWYG editors mess around with the pages’ HTML by adding new elements, borders, labels or replacing them with editable areas with lots of buttons. This is whitespace we do have to cater for should we want to keep our designs usable for editors.

These problems lead to quite interesting remarks from CMS vendors in emails or during training sessions:

CSS can be used for layout, but tables are a lot more flexible and robust. Try not to use float to achieve layouts, it is just not flexible enough.

This both of course is food that has at least once gone through a male specimen of the bovine ilk.

The agony columns

It is true, multi column layout in CSS is a pain to achieve and keep consistent.

  • Absolutely positioned elements are the most stable – even supported by CSS abominations like Netscape Communicator – but are also not flexible, as – unless you use a lot of extra markup or JavaScript – you need to know which column is the longest to make them work.
  • Negative margins are a very sexy way to achieve multi columns, but also rely on a lot of markup and proper positioning.
  • Layouts achieved by floating elements are the most versatile, as any column can be the longest, but they can be tricky when there is not enough breathing space in between the columns or when you need to have more floated elements in them. Peekaboo bugs and fun with haslayout ads to the development and fixing time.

Issues encountered

Check the screenshots of the final web site style versus the editor view to see what the problem is.

In the past I developed a very low budget site with Macromedia’s Contribute – more or less the Dreamweaver design view for the web coupled with an FTP client and basic user editing. Contribute’s edit view simply did not like negative margin layouts, as repeatable elements in the columns moved out were not editable.

In Vignette, Tridion and Immediacy floated layouts got disturbed by the elements added to the view (in Tridion’s case that was the funky drag and drop extension). Most of the time these shifted the edit boxes down the page and displayed some of their borders at the top.

A solution approach

So what can be done to tackle these issues? According to CMS vendors, using tables is the key. I don’t like this, especially not in CMS that advertise with their CSS support and accessibility options (yes, I know tables are not inaccessible, but they are a hack when used for layout). We could also hack and slay our CSS until it is flexible enough to accommodate for the extra elements the CMS adds to our pages, but that seems to be a maintenance nightmare.

We create style sheets for all kind of occasions – different colour schemes, print version, one column, zoom layout and and and – why not an editor stylesheet?

Nearly every CMS I worked with has an option to only show content in edit mode – most of the time placeholders for interactive elements or .NET controls. Contribute is an exception, in which case we might need to add it via a script or plugin. Instead of using this functionality for only commenting we could use it to add a style sheet to overwrite the settings the editor chokes on – replace floating with absolute positioning or even use background images instead of the real HTML constructs pushing the editor out of view. The release script of our CMS should omit this style sheet to prevent it from showing up on the live site, and we can concentrate on creating a slick, easy to maintain style sheet for the rendered HTML.

As not every agency uses a lot of different CMS (it is no fun jumping from one to another and there is money involved – in some cases 6 figures) it would be great if we could start a repository of what CSS layout fails how in which CMS to allow other editors to quickly create their own editor sheets. I am working with Immediacy right now and will create a CSS to get one of my designs working. I am already in contact with them to rewrite some of the training material and will try to get this idea implemented.

6 Responses to “WYSIWYG CMS – The other user agent”

  1. Steve Clay Says:

    Great idea. I haven’t worked with Contribute, but Dreamweaver’s own Design Time Style Sheets work for this purpose. Annoying limitation being you can’t apply them to an entire site/folder, just page by page.

  2. Stephane Deschamps (nota-bene.org) Says:

    That’s a good idea, true.

    There’s also the solution of partial editing, where WYSIWYG was added as an afterthought; somehow the problem is better tackled (IMHO).

    Give the writer a WYSIWYG interface, thus enabling them to type, bold, mark headings sensibly (in an ideal world, I know, but you get my point), insert tables, etc; yet the WYSIWYG is only related to the page’s main central zone, where the content is. The rest of the template is not seen in edit mode. It’s seen in a ‘preview’ mode afterwards.

    That’s what we did when enabling a WYSIWYG editor into SPIP.

    Would you share a few screenshots of an example in situ? Maybe I’m not grasping the whole problem you’re refering to.

  3. Vlad Alexander Says:

    Editors are not necessarily versed in the ways of the web and won’t realize that their texts are far too long and long-winded until they see them in the site’s styles and furniture. They can do that in CMS that are completely separated– all of them offer a preview in one way or another – but that does not give the same feeling as directly writing in the style …

    It’s like the tail wagging the dog, where page layout does influence content. Page layouts come and go, and this is why it’s not such a good idea to author content within a page layout. It also affects accessibility. Often you see content that reads like “… in the left sidebar …” and to most users of assistive technologies, there is no left or right. In a dynamically generated Web site, you also find content that refers to sidebars, navigation elements or ads that are generated dynamically as part of the layout and they are long gone by the time you reach this Web page. So in short, it’s best not to encourage content authors to think that they are authoring for one specific layout.

    Therefore CMS with a full fledged WYSIWYG editing facility inside the template are easier to sell than ones that restrict the editors …

    It’s easier to sell junk food than health food. But sometimes you got to do the right thing. For example, it was not an easy decision for us to produce an editor without a color picker or a font selector. But it was the right thing to do and we haven’t looked back.

  4. KD Says:

    Check out the WYSIWYG LiveSite web content management editor from Interwoven released in January and featured in Internetnews.com http://www.internetnews.com/xSP/article.php/3461171

  5. Frode Danielsen Says:

    I agree with Vlad. I may sound naive when I say that it’s the content that matters. But we’ve all read that a thousand times these last years, and why? Because we are encouraging ourselves to code sites semantically, use CSS for the layout, and maybe add a bit of behavioural and unobtrusive Javascript to the mix.

    What I’ve decided to rather nail to the clients is: You are paying for us (or a 3rd party design agency) to create a visual profile for your company. Our site designs are thought down to the very last detail in how things should appear. You pay us because we know our stuff, and you have other things to concern your mind with. As such, you are supposed to write content for the site, not fiddle with colouring or other visual cues to the reader. Mark your important words as strong or similar, attach your illustrations, and we’ll make sure it is displayed as we mean it to – for your benefit!

    Come on.. These editors probably use an e-mail application to communicate, and most of them do not edit their e-mails with a HTML template – at the most they use RTF-format. They are not too dumb to learn how to write only content, and not having to deal with the placings and colours of everything they write.

    And now I shut up :-)

  6. Joe D'Andrea Says:

    Indeed, walking the CSS/Layout line has proven to be a tricky trick with most CMSs I’ve come across.

    Not to turn this into a product plug, but I think it’s worth mentioning. Have you tried XStandard perchance? Granted, it doesn’t yet work cross-platform (Windows only from what I can tell), but they are most certainly on the right track when it comes to web standards and WYSIWYG editing.

    XStandard generates clean XHTML, uses only external/embedded CSS, enforces proper XHTML usage, supports semantic markup, and so on. Regarding your excellent idea to incorporate a CMS-specific stylesheet, XStandard lets you associate human-readable style names with bits of your original CSS, bridging the gap between content author-speak and CSS-speak. (Read the FAQ for more.)

    Alas, as enamored as I am by it, it’s not (yet) possible to use XStandard with our particular CMS. Sigh.

Leave a Reply

Wait till I come! is the blog of Christian Heilmann , a developer evangelist living and working in London, England. Download vcard.

Feed me, Seymour: Entries (RSS) and Comments (RSS).