Drupal Association members fund grants that make connections all over the world.
"Crawl before you may walk, walk before you may run"
How to enable CCK text fields to use the TinyMCE text editor, in 10 easy steps (in an environment with "Categories" module installed, but also valid for any other environment).
This is a basic, off-the-shelf, step-by-step roadmap of how to set up a text editor that will function in your CCK text fields. It refers to a Drupal 5 installation with CCK and TinyMCE (tinymce-5.x-1.x-dev) installed. It provides a basic configuration to start you off with using CCK with TinyMCE. From that point on you may play around and determine what configuration suits you best. But at least you will have a starting point. This is not a sophisticated recipe, just something that will set you off. What is most important, it works.
- Check that CCK fields within your content type function properly, even if this means that you get a continuous long line of text without any formatting (i.e. without breaks, paragraphs or anything else you would normally expect, even of Notepad). Pick a content type for experimentation, say YourContentType, at: Administer » Content management » Content types » YourContentType.
- Go to: YourContentType » Manage Fields and pick YourTextField » Configure. Check that field Rows has a value greater than 1, so that you may really have a meaningful text area, say 20. Your new text editor will only apply to text fields with over 1 row, so that all your single-row text fields remain unaffected: no text editor there. Data Settings: Required: leave this unchecked for the moment, for testing purposes. Text Processing: check Filtered text (user selects input format), so that your text editor may take over. Now Save Field settings, and go to YourContentType » Display Fields » YourTextFileld and set Teaser and Full at Default - submit to save configuration.
- Install TinyMCE module carefully so that you may do it correctly. Actually, after you unzip the TinyMCE module in the modules folder go immediately and read the very detailed Install.txt file that is provided in the tinymce folder - and follow all instructions carefully. Make sure you also download and unzip the original TinyMCE code in a folder named tinymce within the folder of module tinymce. Detailed instructions on all necessary steps are included in the Install.txt file. In this file, find the section titled Caveats. Read it carefully. Now, read it one more time. Hope you get the point - but, not to worry, we shall do that step by step.
- Go to: Administer » Site configuration » Input Formats » Add Input Formats.
Name: YourInputFormat, Roles: check both anonymous user and authenticated user, Filters: check only Line break converter. Submit (save) your settings. See, YourInputFormat is there in the input formats table, last in line. Now, before we forget, check YourInputFormat *and* submit (Set Default format). Now, click Configure and make certain that what you see is what you entered before - if not, edit. So far, so good.
- Small break for a cup of coffee, check if the plants in the garden are doing fine, relax, etc.
- Back to the task again, in fine spirits.
Go to: Administer » Site configuration » TinyMCE Settings. Read the instructions carefully. In the last line there is a link on the word "permissions" - click on it by opening a new window and you will land in Access Control. Go down the list to section "tinymce module" and check "access tinymce" both for "anonymous user" and "authenticated user" - check also "administer tinymce" for "authenticated user". Save Permissions. Close window.
- Back now to Administer » Site configuration » TinyMCE settings » Create new profile:
- Pick Basic setup: Profile name: YourProfileName, Roles allowed to use this profile: check both, Default state: True, Allow users to choose default: False, Show disable/enable rich text editor toggle: False, Language: en, Safari browser warning: False.
- Pick Visibility. Show tinymce on specific pages: Show on only the listed pages, Pages: leave as is.
- Pick Buttons & Plugins. Check only for an absolutely basic configuration, for the moment - later you may do more: bold, italics, underline, justify left, bullets, cut, copy, paste.
- Pick Editor Appearance. Check: Toolbar location: top, Toolbar alignment: left, Path location: none, Enable resizing button: false, Block formats: leave as is.
- Pick Cleanup and Output. Verify HTML: true, Preformatted: true, Convert tags to styles: true.
- Pick CSS. Editor CSS: use theme css. Leave the rest blank.
- Click: Update Profile
Now, wasn't that easy!
"With patience and calm,
the donkey may climb the palm"