A blog about .NET, Graffiti, Community Server, and Kevin's life

How to use the XStandard editor in CS 2007

Community Server allows users to select what editor they would like to use for writing/editing posts and other things such as ContentParts.  This option is available when editing your user profile under the Site Options tab. The first editor choice is a plain text box, and a WYSIWYG HTML editor has always been included in Community Server as well.

In early versions of CS the standard HTML editor was FreeTextBox. Around version 2.0 or 2.1 we switched to the tinyMCE editor, which is still used in CS 2007. In my personal opinion, they are fine for quick forum posts, but suboptimal for long blog posts like this one. I mostly use client apps like Windows Live Writer when possible.

imageBut there is one web WYSIWYG HTML editor out there that doesn't make me want to pull my hair out because it's fast, reliable, and generates amazingly clean (and strict) XHTML markup. It is the wonderful XStandard editor.

To be fair there are a few drawbacks with XStandard, although they are not nearly as bad as the ugly HTML-mashing markup that every other WYSIWYG html editor I have tried generates.  And there may be other awesome editors out there - I'm just saying XStandard is by far the best one I have ever used.

Anyways, here are a few reasons why you may not want to use XStandard as your CS editor:

  • It's a plugin. You have to install an ActiveX component or plug-in (depending on the browser). Although it prompts you to install it (you don't have to hunt down the web site) and it works in IE, FireFox, Safari, and Opera on both Windows & Mac.
  • There's a free and commercial version, and some nifty features are only in the commercial one.  For example I can't add custom toolbar buttons to the free version, so any extra features like the CS content selector have to be an external button.
  • It is very strict on markup. If for some reason you still want to use obsolete HTML tags such as <font>, <blink>, etc., this isn't the editor for you.

Still with me?  Great, then lets cover how to add XStandard as an available editor on your CS 2007 site. It's actually very easy.  Ever since v1.0, Community Server has supported custom editors via "wrappers".  A wrapper component is needed for each editor you wish to use and basically translates between the CS API and the editor's API.

First, download the Community Server 2007 XStandard Wrapper on this web site.

 Now go to xstandard.com and download and install their XStandard editor control. That will install it for all browsers on your computer. Open the Wrapper zip file and just follow the super-simple steps in the included read_me file. You'll just have to drop the .dll file in your web site /bin folder and add a line to your communityserver.config file.

For those 1 or 2 long-time readers, you may remember that I wrote a XStandard wrapper for CS 1.0 waaay back in the day, before I even thought about working at Telligent.  It worked pretty well, but a funny thing happened during CS 2.0 development that caused me to abandon XStandard until recently. We added tab controls to most of the CS editor pages, and I realized there is a nasty six year old Firefox bug that causes it to destroy and recreate objects (such as XStandard) when you switch tabs. This basically made XStandard in CS unusable with Firefox, and although I tried a JavaScript work-around I couldn't get it to work reliably at the time and so moved on to other personal projects.

In CS 2007 we are using a simpler tab control that makes it easier to implement JavaScript behavior tweaks, and this week XStandard 2.0 was released, so I decided to try again. It took next-to-nothing to get it working in IE, but several hours of JavaScript trial-and-error with Firefox to work-around the aforementioned bug before I finally got it to work reliably.

If you try this out, please leave a comment and let me know how it works for you. Especially if you run into any bugs or have a suggestion for how to improve it. If there is demand, I may create another wrapper for the Professional version of XStandard to be able to use some of the slick pro-only features for those who decide to purchase a pro license.

» Similar Posts

  1. Community Server XStandard Wrapper
  2. Live Blogging the CSDC - Part 3
  3. Live Blogging the CSDC - Part 2

» Trackbacks & Pingbacks

  1. Community Server allows users to select what editor they would like to use for writing/editing posts

    communityserver相关博客聚合 — August 13, 2007 8:30 PM
  2. blog bits This telecommuting job post from a Washington, D.C. firm who&#39;s &quot;looking to build a

    Dave Burke — August 16, 2007 11:12 PM
  3. CS Core Dev Kevin Harder provides a wrapper for the XStandard Editor in CS2007.

    Dave Burke's Community Server Bits — August 16, 2007 11:23 PM
  4. Pingback from  How to use the XStandard editor in CS 2007

    How to use the XStandard editor in CS 2007 — November 27, 2007 10:59 PM

» Comments

  1. stevoo avatar

    Thanks Very useful!

    stevoo — August 15, 2007 5:29 AM
  2. Lee avatar

    HI i saw your post and downloaded the live write it is awesome but one thing i cant get to work with cs is using my own username i have to use admin. any ideas on how i can use my own username?

    Lee — August 22, 2007 5:11 AM
  3. Bill Robertson avatar

    Where is the firefox workaround for recreating flash objects?

    Bill Robertson — August 24, 2007 12:21 PM
  4. Carlo avatar

    Interesting tool but there is not a color picker and my customers need it.

    Carlo — August 30, 2007 5:11 AM

Comments are closed