Wysiwyg text editor only partial works in Added Content Type.

The Problem

When I create a custom Content Type the wysiwyg editor will work if I don't add any other long text fields (which would normally have the wysiwyg editor). If I do add a Long Text field (which I call "How To's") with a Long text Multiple Row widget, it causes problems, as follows.
Location: Home » Administration » Structure » Content types » How To's » Manage fields
At the bottom of the field settings page in the "Number of Values" box
This Works: I add a new Long Text Field and put a "1" in the "Number of Values" box, Then, when I "Add Content" using my custom content type, the appropriate long text field in my content type will have the "enable rich text" link at the bottom of each text field.
This Doesn't Work: However, in the "Number of Values" box, if I choose "Unlimited (my preferred choice) OR any other number the problem occurs. When I try to "Add Content" using my Custom Content Type, the "enable rich text" links will NOT show up at the bottom of any of the long text boxes.
.

My Objective

I'm trying make a custom content type for a step by step how-to's. Besides the standard Title, Body text fields, and some other fields, I want to have a multi-step section that uses the long text field with a Wysiwyg editor. By enabling the "Number of Values" to unlimited, that allows each author to add as many steps as needed for the each tutorials.

Am Using the following:
Drupal 7.0
Tried it on both TinyMCE 3.4.1 And CKEditor 3.5.2.6450

Best Wishes,
Stephen

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TwoD’s picture

I'm not sure why the editor doesn't show up at all, I'd have to look closer at that, but Wyswyg currently doesn't support multi-value fields when adding a new value. (See #864136: "Add another item" button breaks all WYSIWYG editors on edit form for background.) That would have been relly hard to get working in D6, but for D7 we should be able to hook into AJAX events to know when to attach/detach editors to stop them from causing problems.
This is also related to #356480: Lazy-load editors, which will make it easier to handle that sort of thing.

Stephen Winters’s picture

Hi TwoD,
Thank you very much for answering. Thanks for giving me those links. In all my searching I hadn't seen these links.

Actually I do (kind of) have Wysiwyg editor working with Drupal 6. (See the attached picture below.) I used a CCK text field with a "text area (multiple rows)" widget. I say, "kind of" working because the wysiwyg text field only goes about 2/5's of the way across the screen. Since I like to put a good sized picture in each step of my "How to's", that makes it quite challenging to actually use it for my purposes. Do you know any way to make this Drupal 6 CCK text field expand across the screen so that it would be usable. Since my current website is on Drupal 6, that would serve my purposes at present.

I am really looking forward to when Wysiwyg support for Multi-fields in Drupal to be fixed. That would be great. Is there anything that I can do in the meantime
'Thanks
Stephpen

TwoD’s picture

Hmm, that width issue looks like a styling problem. If the field has a fixed width set via CSS (or perhaps in columns, don't remember), TinyMCE will shrink the editor to take up roughly the same space. There might also be a div, table cell or some other element with fixed width which forces the editor to not go full width. I suggest using Firebug for Firefox, Firebug lite or a similar tool to inspect the HTML/CSS and see what might be causing this.

brisath’s picture

Subscribe. I'm getting the same thing with a CCK field in version 6.x If I have multiple lines the editor won't show but if I change to single line text the editor does come up. The regular "body" field of the node loads the editor fine, but CCK fields for multiple lines are not displaying an editor. I tried TinyMCE 3.3.9 and 3.4.2 with same results.

sun’s picture

Title: Wysiwyg editor won't work in Long Text Field of custom Content Type when Number of Values is set to anything other than 1 » No editor appears for multiple/unlimited text fields and having rich-text disabled by default
Version: 7.x-2.0 » 7.x-2.x-dev

Better title - wild guessing on the rich-text disabled by default bit though.

silloyd’s picture

The editors work for me with multiple value fields - when enabled by default - but reordering the editors a couple of issues - the dragged editor no longer works, and clicking disable/enable causes the editor interface to multiply (i.e loads the interface again without removing the old buttons).

TwoD’s picture

Status: Active » Closed (fixed)

Lots of things changed since this issue was created. Multiple variations of "no editor appears" bugs have been fixed since so I'm closing this to clean up the queue.
If you still have issues with the latest -dev version, please open a new issue.