Getting the TinyMCE WYSIWYG editor for your Drupal installation

Drupal version: Drupal 6.x

Drupal doesn’t come with an inbuilt WYSIWYG editor, as does WordPress. Thus one of the first things we would want to do after installing Drupal is probably to add a WYSIWYG editor.

Okay, so let’s start with downloading the WYSIWYG integrator from here. We will install this as usual to /sites/all/modules/, activate this by going to Administer > Site building > Modules (admin/build/modules) and will then configure the WYSIWYG editor by going to Administer » Site configuration » Wysiwyg (admin/settings/wysiwyg).

We will follow the onscreen installation instructions, and will choose to install, let’s say, TinyMCE for our Drupal form. We will have to install tinymce to /sites/libraries/ and will probably have to modify a file if we encounter a version error. The file to be modified is sites/all/modules/wysiwyg/editors/tinymce.inc where we need to find out a line like

1
$line = fgets($script, 100);

Let’s change this to

1
$line = fgets($script, 200);

This should work now. If it doesn’t, let’s put a higher value in lieu of 200 and try again.

We will now play around with TinyMCE settings vis-à-vis Filtered HTML and Full HTML. Care to be taken here: if you are using a theme with dark background, take care that you have selected Editor Default CSS in the CSS tab of your TinyMCE profile.