Why Oh Why, YUI?
December 12, 2008 5:22 PM   Subscribe

DrupalFilter: I need help configuring YUI Rich Text Editor so that it appears in specific non-body fields in a specific content type [CCK-created bio page] while also appearing site-wide in all body fields.

I love YUI text editor. With default settings enabled (both "paths" and "IDs" left blank), it appears in all the usual body fields (across quite a few specific content types), such as in stories, events, etc.

However, we have one particular content type on our site -- an expanded user bio linked to the user account with a bunch of CCK fields -- where I need YUI text editor to appear in just one of these fields (where the user writes a biographical text) in addition to appearing in all the usual body fields in other content types.

Presumably I need to put the field ID into the "IDs" field in YUI Editor Settings. But I don't understand the syntax of the field ID. Looking at the source of the CCK output, I see something called:

id="edit-field-bio-0-value"

Presumably this is the "ID" of the field that YUI needs to know, right? What syntax do I use to specify this field in the YUI IDs settings field?

By the way, in my "Paths" field, I have the following:
node/add/*
node/*/edit

(and this seems to work to make YUI available in body fields sitewide)

Thanks very much in advance. This is non-profit stuff and I'm not a developer, so maybe it's more obvious that it seems, but I cannot find documentation of the YUI Rich Text Editor Settings interface, or its integration with Drupal, anywhere. YUI RTE works beautifully elsewhere throughout the site -- by far the best solution I've tried. But this is frustrating me. I'll monitor the thread and answer any questions.
posted by fourcheesemac to Computers & Internet (3 answers total) 1 user marked this as a favorite
 
I don't anything about YUI, and not much about Drupal, but have you tried reviewing the YUI project's pages on Drupal.org? You can review the open and closed issues for YUI here, and if necessary file a support request here.
posted by CruiseSavvy at 10:17 PM on December 12, 2008


If I were you, I would try just putting "edit-field-bio-0-value" in the ID settings field, to see if that works. I'm pretty sure that's the right syntax.

I'm not sure that's the ID YUI is looking for, though; there are other possibilities, such as the field name (which you would find on the content-type "manage fields" admin page). But I think most likely it just wants the CSS ID.
posted by bricoleur at 5:31 AM on December 13, 2008


You might have figured this out already, but if not, you're correct that the ID that you saw in the source is the same ID YUI requires in that box. Just put the text of the field ID into the box and it will add the text editor to that field. For multiple IDs, you need to add each on a separate line.

One complication is that once you specify any particular value, then it will remove the default settings -- i.e., if you put "edit-field-bio-0-value" into the field, then that's the only field that will display the editor.

To get back the default behavior, add the "edit-body" ID to the settings. This will put the editing toolbar back onto the body fields for the various content types.
posted by camcgee at 9:47 AM on December 14, 2008


« Older What do I do with my luggage?   |   Why Can't I burn a DVD? Newer »
This thread is closed to new comments.