Another oddity. Editing a normal body field behaves differently to editing a custom longtext field.

When I end a node that has the normal body field everything works fine - the media objects inserted into the WYSIWYG editor behave correctly, the media is displayed inline as expected. Editing a node that has a custom longtext field doesn't work correctly, instead of the inline media it outputs the raw media string, e.g.:

[[{"fid":"9798","view_mode":"default","fields":{"format":"default","field_file_image_alt_text[und][0][value]":"","field_file_image_title_text[und][0][value]":""},"type":"media","attributes":{"height":362,"width":499,"class":"media-element file-default"}}]]

Comments

DamienMcKenna’s picture

Title: Editing a normal body field is different to a custom field » Multiple WYSIWYG editors on one form breaks Media integration

After debugging further I've realized this happens when there are multiple WYSIWYG fields on the one page, not because of the type of field.

DamienMcKenna’s picture

Further debugging, it seems that images work correctly IF they're in the first WYSIWYG field, but images in any others don't get processed correctly. That said, any images from the first WYSIWYG field that also appear in others are displayed correctly in all locations.

DamienMcKenna’s picture

FYI this problem no longer exists with CKEditor 4.2.2 and the combination of patches described in https://drupal.org/node/2067063#comment-8009717.

bneil’s picture

Component: WYSIWYG integration » Code
Issue summary: View changes
Status: Active » Closed (cannot reproduce)

I've tested out the latest versions of Media/File Entity with WYSIWYG module and the latest 4.x version of Ckeditor library and I also cannot replicate the issue.

DamienMcKenna’s picture

@bneil: It seems to have been fixed over the past year, thanks for following up.