We're using the WYSIWYG API module with FCKEditor as the plugin editor. I see this editor in our Announcements body field but not in the abstract field. How can I get the editor to show for the abstract field?

-backdrifting

Comments

NancyDru’s picture

Project: Announcements » Wysiwyg
Version: 6.x-1.3 » 6.x-2.1

There is a list of textareas that has to be defined in FCKeditor/WYSIWYG.

TwoD’s picture

The fckeditor.module does it that way, but the wysiwyg.module associates editor profiles with an input format. Wherever the input format appears, so will the editor - if the module creating the field uses filter_form() according to Wysiwyg's developer guidelines.

Basically, this is most likely not an issue with Wysiwyg module, but the one creating the abstract field.

NancyDru’s picture

Project: Wysiwyg » Announcements
Version: 6.x-2.1 » 6.x-1.4
Assigned: Unassigned » NancyDru
Category: support » feature

Thank you, Henrik. Taking the issue back.

NancyDru’s picture

Status: Active » Fixed

Despite my disdain for WYSIWYG editors, especially on the abstract, I have committed this change to 6.x-1.x-dev.

TwoD’s picture

Are you sure that change works as intended?

$form['abstract']['format'] = filter_form($node->format);

That would mean filter_form() generates a format selector with the node body's active format preselected. The theme function for the abstract does use that format during rendering:

function theme_announcements_abstract($node) {
  return '<div class="announcement-abstract clear-block">'. check_markup($node->abstract, $node->format, FALSE) .'</div>';
}

But wouldn't it look like it'd be possible for the user to select a format for the abstract other than the one used by the body, though this would appear to change to the body's format when re-editing the node? Changing the format for the abstract would essentially have no effect, since only the value for the body is used for both.

NancyDru’s picture

Many people don't even use the body field at all (#881864: Hide Body). My original intent with the abstract was that it be simple and so wouldn't need an editor at all. But adopters seem to be able to find uses that were outside my intent.

To create another input format selector, I would have to save it somewhere (like the database table) and all the code to maintain it. It hardly seems worth all that.

When I get this module over to D7, it probably won't be a traditional "node" module anymore, but will use fields and the adopters can do whatever they want. Actually, with Fields, Views, and Scheduler, this module might just become a Features definition.

NancyDru’s picture

Okay, I set it up with a separate input format for the abstract.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.