I am facing this odd problem. What I did (mistakenly though) was that I initially created some text fields for a content type and created lots of content for those fields. Now I want to change the formatting of the contents of those fields, mainly changing fonts and making it bold,so as to match the style of the content of other fields on the same node. With this in mind I changed the setting of the relevant text fields to filtered text but after doing so the editor appears but the content of the text field disappears and the text area which appears does not take/save new content.

Please help me from falling into the lengthy task of deleting all those test fields and recreating it with field type Long Text and then re add content to each of those fields on each node.


TwoD’s picture

I'm not at home right now so I can't verify this, but it would't surprise me if this is the same problem as what was encountered in #466054: FCKeditor: Breaks on CCK textfield (not textarea).
Because D7 for some reason allows markup in textfields, we must find a workaround for this. I have a few ideas but they currently feel a bit hackish, so I'll see if I can polish them a bit before attempting a patch.

camsoft2000’s picture

Has this been resolved yet, this was an issue raised in November of last year?

mstef’s picture


If you have wysiwyg on a textfield (filtered text selected as a field setting), anything you enter in the editor will not be saved. If you enter a bunch of text and click "disable rich-text", the text field remains empty.

mstef’s picture

Strange.. if you use Firebug (or something similar) to change the text field to a textarea, it works fine. Seems like a bug with CKEditor. Still confirmed bug with CKEditor 3.6.x and the latest WYSIWYG 7.x-2.x-dev.

*EDIT*: Things work fine with TinyMCE. Have to assume this is a problem with CKEditor.

TwoD’s picture

Yes, CKEditor is not designed to work on textfields. I'm considering a workaround where we temporarily "replace" the texfield with a textarea before attaching the editor. The extra textarea would be removed when the editor is detached and its contents moved to the textfield. Not sure how stable that would be though.

davidwhthomas’s picture

Same issue here, just for the record.

TwoD’s picture

vchen’s picture

same problem

liquid06’s picture

Oh wow. I was so confused about why my text wasn't being saved! Is there a ckeditor-specific documentation area somewhere for this module to add a note about this?

TwoD’s picture

jamsilver’s picture

For those of us trying to make this work - the following is a workaround which seems to do the trick:

1. Add this code in a custom module somewhere:

 * Implements hook_field_widget_info_alter().
function MYCUSTOMMODULENAME_field_widget_info_alter(&$info) {
  if (isset($info['text_textarea'])) {
    $info['text_textarea']['field types'][] = 'text';

2. Choose the "Text area (multiple rows)" widget on your normal text field

This makes Drupal output a textarea element for your (short) text field, which ckeditor happily attaches to.

sokrplare’s picture

Issue summary: View changes

Great workaround idea - using successfully!

TwoD’s picture

Status: Active » Closed (duplicate)
Related issues: +#2427559: CKEditor support for textfields

Marking this a duplicate since the linked issue already has a patch.