Convert Entity embed image drupal-entity tags to image tags for Json API

by rockvilla   Last Updated February 11, 2019 09:07 AM - source

When adding image into CKeditor using Entity Embed the source code looks like this,

<drupal-entity data-embed-button="media_browser" data-entity-embed-display="view_mode:media.embedded" data-entity-type="media" data-entity-uuid="2766d77e-6ada-45b2-8706-54e92bcf686d"></drupal-entity>

The html output in Json APi looks like this,

"body": "<drupal-entity data-embed-button=\"media_browser\" data-entity-embed-display=\"view_mode:media.embedded\" data-entity-type=\"media\" data-entity-uuid=\"2766d77e-6ada-45b2-8706-54e92bcf686d\"></drupal-entity>\r\n",

How to ensure the images would be shown in img tags in Json API so other systems like Angular or Mobile apps can readily use it.

Tags : 8

Related Questions