tags:

When it comes to using a WYSIWYG editor in Drupal, TinyMCE and FCKeditor are the heavy weights in the contributed module arena. TinyMCE seems to have more supported plugins and modules, while FCKeditor seems to have the community's love (as much as any web developer can possibly love a WYSIWYG editor, that is). To complicate things, Drupal is moving towards using the WYSIWYG API module as the future for WYSIWYG editing, requiring more to consider than simply the TinyMCE (or TinyTinyMCE) and FCKeditor modules.

Here is a list of features of each:

WYSIWYG API

This API module supports adding TinyMCE and FCKeditor very easily as a plugin. In fact, you could use both modules at the same time without a hitch.

It controls all aspects of the editor via input format. For each available input format, you choose one of any installed editors, or none at all. If there is no input format attached to a textarea then no editor will appear, solving some of the historic problems of the editor appearing on inappropriate textareas.

Editor appearance and such are also all configured on an input format basis. This allows you to limit the display of buttons to only those the input format will actually support.

This system will allow you to support non-WYSIWYG mark up syntaxes rather flawlessly, such as using Markdown for anonymous users, and attach a WYSIWYG editor to the full HTML input format for your power editors.

There is a catch to this method. All users must have access to the same input format (filtered HTML in a default installation), and that globally accessible input format is the default input format whenever you create new content. This can cause a lot of inconvenience, so you may want to consider the Better Formats module to control the default input format.

The Better Formats module will allow you to:

  • Set a default format per role and content type
  • Set a separate default format for comments of a content type
  • Limit which filters are available to a content type
  • Expand the input format fieldset to make it more obvious
  • Hide the input format fieldset to force the default

Coupling those features with attaching a WYSIWYG editor to an input filter will make controlling the editor's display settings quite fine tuned to your site's needs.

TinyMCE

The TinyMCE module has been abandoned since last March. Although it has been successfully ported to Drupal 6, it would be best to use a more supported version for new web development.

There is another module, though, called Tiny Tiny MCE, that strives to make things simpler. It strips away many of the configuration options, offering just two modes: simple and advanced. I am going to assume that most developers want something they can tailor to the needs of their website and users, so I am not going to recommend this solution.

TinyMCE as a plugin for WYSIWYG API

TinyMCE is fully supported in WYSIWYG, allowing you to do everything you could do in the old TinyMCE module. This is an adequate replacement for the abandoned TinyMCE module.

  • Default view: enabled, disabled, allow user to decide, show toggle
  • Pick and choose which buttons to enable
  • Editor appearance
    • Toolbar location
    • Button alignment
    • Path location
    • Enable resizing
  • Cleanup and output
    • Verify HTML
    • Preformatted
    • Convert <font> tags to styles
    • Remove linebreaks
    • Apply source formatting
    • Force cleanup on standard paste
  • CSS
    • Block formats
    • Editor CSS

Display would be controlled by the WYSIWYG API, and access control via input formats.

The TinyMCE UI

This is all individual preferences, but I find I much prefer the TinyMCE UI. It is very clean, simple and straight forward. The editing area can be resized at will as well to accommodate a user's preference, which is just darn convenient when editing a large document.

TinyMCE Output

If you enable "Apply source formatting", new markup rendered through the editor will each be on a new line, with no line breaks between them. This will help you avoid the dreaded all-HTML-on-one-line blob of unreadable text. To avoid common conflicts with the "line break converter" filter, add <p> and <br> to the allowed HTML tags.

To have more control over white space, you could disable the "remove linebreaks" option, however, the "line break converter" filter will cause conflicts and a messy output if it is not removed from the input filter.

FCKeditor

When compared to TinyMCE, there is significantly more configuration options. The significant ones are emphasized.

  • Configuration by role, and control which roles take precedent over other roles
  • Allow users to create a custom configuration
  • Manual control over which text areas will have the editor, and whether to display a "simple" version or not
  • Editor appearance
    • Default view: enabled, disabled, show toggle, show as pop up window
    • Collapsible toolbar, display expanded or collapsed by default
    • Choose which buttons are displayed through preset options (can create your own preset through editing a file)
  • Cleanup and output
    • Control action on enter and shift+enter
    • Font formats
    • Apply source formatting
    • Format output
  • Editor CSS
  • Custom Javascript

The downside is that you have to edit a file in order to customize the button display, as opposed to TinyMCE's web-based configuration. Plus, that file is one included with the module, and not one that has an "example" file which you can copy to prevent you from overwriting it when upgrading the module.

FCKeditor as a plugin for WYSIWYG API

At this time FCKeditor is not fully supported. The configuration options available in the FCKeditor module are not available here, and appears to be tailored for TinyMCE instead. Although it shows a lot of the same options that TinyMCE had, most of them do not work.

The editor works, there just is not a way to configure it through the web browser (I am sure you could hack the code, though). As such, my recommendation would be to not use FCKeditor with WYSIWYG API until its configuration is supported.

The FCKeditor UI

Again, individual preferences, but I find the FCKeditor to be cluttered. I dislike that each button is rendered a button, adding many more lines and gradients than is necessary. There are three "skins" to choose from (so I suppose I could create my own skin!), which are: glaringly yellow, painfully MS-office, and so-close-yet-not-simple silver. Of the three, I prefer the silver one.

Unlike plain text textareas and the TinyMCE editor, you cannot resize the editing window.

Behavior issues:

  • Cannot right click to paste in FF3
  • Toggling the editor causes you to lose your text

FCKeditor HTML output

The configuration options "apply source formatting" and "format output" help to create readable code. When you use the "source" button to view the source, or switching to plain text editor, the HTML is nicely formatted with line breaks and tabs. Upon submission, the same line breaks remain, but the indentation is removed. In my tests, I did not notice any conflicts with the "line break converter" filter.

Unfortunately, there is no way to configure this behaviour within the WYSIWYG API.

Overall, though, the FCKeditor module is giving the clean output web developers long for.

Conclusions

If possible, using the WYSIWYG API module is preferred since it is where the Drupal community is moving towards. Attaching the editor and configuration to an input format, coupled with the Better Formats module is a superior means of control. The alternative is attaching the editor to a user role, and fine-tuning the editor's display by enabling or disabling its rendering on a textarea by picking each textarea or path individually.

TinyMCE

Pros:

  • Fully supported by WYSIWYG API
  • Configure visible buttons through the web interface
  • Minimalist interface

FCKeditor

Pros:

  • Nicer HTML output with indentation

Cons:

  • Not fully supported by WYSIWYG API
  • Configuring the visible buttons by editing a file
  • Some UI bugs (can not right click to paste, loses changes if you toggle to plain text)

The nicer source HTML formatting was quite good on FCKeditor, but using WYSIWYG API is also very important to me, so I am going to have to call it for TinyMCE.

My final decision, however, will depend upon my review of Image Assist (compatible only with TinyMCE) and Image Browser (compatible only with FCKeditor).

Image Assist works with FCKEditor as well -- at least, it does when you install the full FCKEditor module.

I have been a long time user and promoter of TinyMCE. Recently I've been using FCKEditor. It seems zippier and has more options.

Ideally people will throw their weight behind WYSIWYG API, with very "thin" modules per editor that do nothing more than allow configuration of advanced options. Everything else -- including inclusion / exclusion -- would be handled by WYSIWYG API.

If you're looking at image modules that work with wysiwyg editors, it might also be worth looking at imce because although I'm impressed with imagebrowser, and the fact that it works with imagecache, it lacks some of the added functionality of imce. Also, it's an image module that will work with both Tiny and FCK.

Also a long time supporter of TinyMCE, which I use exclusively when clients demand that functionality, I had recently come across the Yahoo YUI Rich Text Editor, which also has a minimalist config and usage interface. See http://drupal.org/project/yui

While it probably cannot compete with Tiny and Fck in breadth of functionality, I could see many use cases where it might be less confusing and smoother for some clients.

I was wondering if you had looked at this alternative.

I love the unifying effort of WYSIWYG API.

On images, whereas the interface of IMCE and the classic FCK approach may be cool, this is file management only, Image Assist is the only one which works with images as nodes and in galleries, or any taxonomy scheme, which is what you would probably want to work with. So it is always my choice in spite of somewhat clunky, albeit flexible options (including image CSS), interface.

Image handling is definitely something that needs to be unified, a la WYSIWYG.

Yay! Thanks for this (very first) extensive review of Wysiwyg API! :)

I'd like to reply to some of the issues you outlined:

  • Wysiwyg API will replace all editor integration modules in contrib. Including the so-called "pseudo-editors" (i.e. BUeditor, markItUp, etc).

  • Better Formats is indeed a very neat approach to solve the usual input format issues (with or without editors).

  • The TinyTinyMCE module seems to have a strong user-base, and I was unable to convince them that joining forces will benefit all users. Definitely not recommended.

  • Likewise, the developers/maintainers of FCKeditor promised to step up and enhance the support for FCKeditor in Wysiwyg API a long time ago (and even told me explicitly to NOT do anything about it). There is no progress so far, FCKeditor is very hard to grasp, and in the meantime I suspect that I have to do it on my own. :( And yes, users should not have to edit any file manually.

  • Yes, Wysiwyg APIs profile configuration is still based on the old TinyMCE module. I am working on a new, generic approach over in Allow to configure advanced editor settings, which will soon be part of Wysiwyg API 2.x.

  • It seems like the current profile configuration form could do a better job on explaining the output options? Feel free to open an issue with optimized string proposals, please. What you've written above sounds pretty good already. :)

  • Now, a final word on the overall progress and goal: Wysiwyg API not only replaces all editor integration modules, but also unifies the integration for all other Drupal modules in contrib by providing a central API to supply plugins/buttons that work in any editor (even if there is none). There is an "epic patch", almost ready to be committed (Rewrite editor plugin API), which will allow modules like Image Assist or any other module in contrib to expose an editor button that works in all editors, which support external plugins (i.e. TinyMCE, FCKeditor, markItUp, YUI, etc).

That said, all users should read the new handbook pages.

Any chance of seeing support for filemanager and imagemanager in the wizi-wig api? Right now that's the only reason that I haven't switched over from the tinymce 6.x-dev module.

Image Assist works with FCKEditor as well -- at least, it does when you install the full FCKEditor module.

I did not test it with FCKeditor, however, all the documentation spoke of only WYSIWYG API and TinyMCE, so I assumed it wouldn't work.

If you're looking at image modules that work with wysiwyg editors, it might also be worth looking at imce

The difference between IMCE and Image Assist / ImageBrowser is that IMCE handles images as files, while the other two handle them as image nodes. I have started a review of the two and will post it once I clean it up.

It seems like the current profile configuration form could do a better job on explaining the output options? Feel free to open an issue with optimized string proposals, please. What you've written above sounds pretty good already. :)

Yes, the configuration copy definitely could be improved! I almost called it for FCKeditor due to the HTML output because I didn't realize "Apply Source Formatting" meant "clean up the HTML output". I thought it meant "Use the rich text formatting from the source you're copying from" ie: preserve bold, headers, colors, etc.

Any chance of seeing support for filemanager and imagemanager in the wizi-wig api? Right now that's the only reason that I haven't switched over from the tinymce 6.x-dev module.

Image Assist currently works with WYSIWYG API. I haven't yet tested other file management options, but I will need it for the current project I'm working on.

Thanks for such a great writeup - I've seen a few other recent wysiwyg reviews in the last months and this is the first one that's provided enough information for me to be able to actually start making choices within the recently redefined wysiwyg landscape. All the other reviews covered so many different up-and-coming things, with no real conclusions, that by the end of reading the articles I just felt like the smartest thing for the time being was to stick with using tinytinymce by itself.

My plan now is hook up wysiwyg API along with TinyMCE proper, and add Better Formats.module and IMCE (which is what I personally prefer over Image Assist or ImageBrowser).

Fantastic review.

Better Formats wasn't around when I installed WYSIWYG API so I used Filter Default. Filter Default lets you set the default filter by role but not by node type. Better Formats seems to be much more powerful, so I'll definitely use it in the future!

Thanks again for the great review.

I am going to assume that most developers want something they can tailor to the needs of their website and users, so I am not going to recommend this solution.

I think you are wrong with this statement related to tinytinymce. I'm using tinytinyMCE because of it´s flexibility. You can customize the advanced theme in tinytinyMCE administration with javascript code - everything is documented at moxiecode systems tinyMCE-website. That kind of customization allows you to be much more flexible than with the old tinyMCE module with it´s limited button configuration. You can embed own tinyMCE plugins / themes with ease - And everything you can read in the tinyMCE documentation just works as described. tinytinyMCE is a great module because of it´s simpicity and I´m not very happy with the trend to the very limited WYSIWYG-API, wich makes customization very complicated.