mazze's picture

Hi, a possible customer wants to upgrade its large D7 site. He made use of the Media CKEditor module in Drupal, which embeds images in WYSYWYG field with code like

<p>[[{"fid":"5916","view_mode":"default","fields":{"format":"default","alignment":"center","field_file_image_alt_text[und][0][value]":false,"field_file_image_title_text[und][0][value]":false},"type":"media","field_deltas":{"2":{"format":"default","alignment":"center","field_file_image_alt_text[und][0][value]":false,"field_file_image_title_text[und][0][value]":false}},"attributes":{"class":"media-element file-default media-wysiwyg-align-center","data-delta":"2"}}]]</p>

Is there any function in Backdrop CMS which converts this code into proper media asset code <img src="..."/>. Or is there any function in D7 to get rid of the module before upgrading?

Any comment is very welcome:-)


I don't know of any module that will do it, but I wonder if you could write a custom module that loads every node, runs text area fields through the filters and then resaves the nodes to write the filtered markup into the fields?