WYSIWYG Editors: Issues And Options


The difference in the ouput of the two editors this particular post is subtle because I haven't added any extras (such as bold, italics, or alignment) to that first paragraph. But I think many people (especially folks new to web development) will agree that the wysiwyg editor view is more familiar and more inviting when it comes to creating content. There are certainly many more possibilities for those who don't have html skills.
Which Editor?
As of Drupal 6 there isn't a wysiwyg editor that is part of the core release. So that means if you want to have pretty post editing then you'll need to select a module of choice, install, configure and hope like heck that it works for you. But what editor to choose? Some of the more popular ones are FCKeditor (seen in the screenshot above), TinyMCE and BUEditor. Because this is open source the landscape with respect to wysiwyg changes over time. FCKeditor still works with Drupal but there's a new version called CKeditor that represents the next generation. Another interesting but less popular option is Whizzywig.
Once you've made your choice of editor then you need to get it installed and configured which is not necessarily the simplest task. In the case of FCKeditor and TinyMCE you download the actual editor separately from the module then upload the files to somewhere in the directory of the module. This is a step that often causes a bit of confusion. Thankfullly there's now a module called Wysiwyg that eases the integration process for these editors. If you use Wysiwyg then you can just upload the editor's files to the sites/all/libraries folder which you would create and then use the Wysiwyg module to configure the editor. Wysiwyg makes it simple to try out different editors and it supports the most popular editors.
Having tried installing different wysiwyg editors as both standalone modules and via the Wysiwyg module I've come to the conclusion that the Wysiwyg module is the way to go. The one issue that I have had with the Wysiwyg module is the fact that you may not have access to all of the various configuration settings that you would if you installed the standalone editor module. The upside is that you have a much simpler install and configuration process.
Let's Talk Images
The inclusion of images is a very important topic that comes up when discussing wysiwyg. Content creators want a simple way to include images in their posts. Most editors make it easy to link to an image but uploading and inserting images into posts typically causes problems. IMCE (installed on over 60,000 Drupal sites) is a very popular option that works well for me. There are some headaches that occur when using IMCE with a standalone editor module. This is where the Wysiwyg module offers additional benefits. The IMCE Wysiwyg Bridge allows you to easily use IMCE along with your editors that are enabled via the Wysiwyg module. For the moment this only applies to TinyMCE and FCKeditor but it could change in the future.
It's worth noting that I think that IMCE works best when using it for inserting images into posts and not when you're looking to create a standalone image gallery. Because while IMCE does do thumbnails it doesn't create galleries or cover more advanced actions like cropping and watermarking.
Beware Input Formats
Input formats are something that you want to consider when using wysiwyg editors. Drupal comes standard with 3 input formats, Filtered HTML, Full HTML and PHP code. For the most part if you're editing posts with a wysiwyg editor and insterting images then you want to use Full HTML. Notice that I said you want to use Full HTML. What about your users? If people are signing up to write blog posts then you probably want them to use Full HTML too. But if you allow anonymous comments you probably want to have a more restrictive format like Filtered HTML that only allows certain tags.
Input formats can be a very complex topic. Make things easier for yourself and have a look at the Better Formats module. Better formats offers you more flexibility with your input formats for content types. My favorite feature is that it allows you to specifically assign an input format per role. The simplest example of this is giving authenticated (signed in) users access to Full HTML and giving anonymous (not signed in) users access to Filtered HTML. It also gives you separate options for nodes and comments. This is very helpful and allows you to fine tune your content editing much more than allowed by the core features.
Drupal 7 And Beyond
It appears at this time that Drupal 7 does not include a wysiwyg editor by default. A recent post I saw indicates that there will be, "Improved support for integration of WYSIWYG editors." That being the case installing and configuring wysiwyg editors will continue to be an important skill for some time in the future for Drupal site developers. Whether or not that's a good thing or a bad thing will depend on who you ask. Hard core, old school developers would probably rather choose and configure the editor they like best rather than being stuck with what the Drupal community decides is the best option. People newer to Drupal development would probably prefer a default editor that also handles post images as well. I think that a good compromise would be to have a default editor that admistrators can choose to disable in favor of a different editor.
If this is a subject that you're passionate or curious about then see the Wysiwyg group over on Drupal.org. Lots of good information and discussion over there.
Additional Learning
- learnbythedrop's blog
- 4715 reads


Comments
I would just issue a word of
I would just issue a word of caution on input filters.You say "If people are signing up to write blog posts then you probably want them to use Full HTML too.", but that can be very dangerous. Using full HTML allows inclusion of javascript, as well as any Flash object. Both can open your site up to attacks. Unless you are certain you know and trust the people signing up to write posts, then it is best to give them a much more restrictive filter (perhaps even creating your own and not allowing only things like script, object, embed tags)
Another point where this causes problems is on WYSIWYG when you copy and paste. If you copy from one website to your WYSIWYG editor then you get all the underlying code, including things like javascript. In that case it is best to enable the "clean up on paste" option in editors that offer them, like TinyMCE. That way any pasted text is automatically cleaned.
bueditor is not a wysiwyg
Although bueditor is a nice module, it is not a wysiwyg. It is a simple JS-based helper to generate HTML tags in a non-wysiwyg text area. "What you see" is still the raw HTML, not "what you get". ;)
Input or Import Format?
I believe you made a typo - "Beware Import Formats" should be "Beware Input Formats", no?
Rgds,
z
Good Catch
Thank you. It has been corrected.
Other editor issues
One of the major issues that I have noticed with editors, WYSIWYG or not, is that the box in which one edits is often too damn small for comfortable use. If your document is longer than a paragraph, you find yourself constantly scrolling up or down, or as most people do, editing somewhere else and then pasting text (often from, ugh, MS Word or an open source equivalent) back into your editing box.
The system works well for most "comments" boxes, where keeping things short is usually desirable. It is not useful for longer documents.
This is one of the few things that Wiki editors often get right--you most often get a full screen in which to edit your words. End of claustrophobia.
When I look at ideal editors these days, I think of them as being both WYSIWYG (five years from now people will remember direct HTML or Wiki coding with the same lack of fondness that they remember .troff or WordStar), and having a full screen in which to edit--with a tab for entering/maintaining the metadata and anything else related to the document.
helpful
Thanks! This article was helpful. I have been using bueditor, but need to find something true WYSIWYG again. Used to use TinyMCE with many sites and it was disaterous. Really messed up the code.
Thanks!
CKeditor finally works
CKeditor version 3.1 with the new Drupal module released on Jan 14 is now stable, has all the features of the older FCKeditor, and is easy to install. The file browser buttons now work as they should with ICME, as well as the developers own browser CKfinder. I just prefer CKeditor (over the other mentioned WYSIWYG editors) because it loads fast, and users familiar with MS Word learn the interface quickly.
CKEditor
That's good to know. It looks great. I've had a chance to use it over on the new Drupal Gardens as they have CKEditor installed as the default WYSIWYG. Looking forward to taking it for a spin and perhaps upgrading my sites to use it.
Re: WYSIWYG Editors: Issues And Options
Thanks for the very informative site! Can you please explain how to go about installing CK editor for Drupal 6 as I can't seem to get it running like a typical module.
Thanks in advance.
Post new comment