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.
Comments
Comment #1
TwoDI'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.
Comment #2
camsoft2000 CreditAttribution: camsoft2000 commentedHas this been resolved yet, this was an issue raised in November of last year?
Comment #3
mstef CreditAttribution: mstef commented+1
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.
Comment #4
mstef CreditAttribution: mstef commentedStrange.. 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.
Comment #5
TwoDYes, 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.
Comment #6
davidwhthomas CreditAttribution: davidwhthomas commentedSame issue here, just for the record.
Comment #7
TwoDMarked #1255462: Ckeditor and CCK Default Text Field? and #1527994: CKeditor submits empty text for text fields as duplicates.
Comment #8
vchen CreditAttribution: vchen commentedsame problem
Comment #9
liquid06 CreditAttribution: liquid06 commentedOh 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?
Comment #10
TwoDMarked #466054: FCKeditor: Breaks on CCK textfield (not textarea) a duplicate of this issue.
Comment #11
jamsilver CreditAttribution: jamsilver commentedFor 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:
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.
Comment #12
sokrplare CreditAttribution: sokrplare commentedGreat workaround idea - using successfully!
Comment #13
TwoDMarking this a duplicate since the linked issue already has a patch.