when I inserted a pdf file for example in the editor I always get
<img src="http://monsite.com/sites/all/modules/custom/media/images/icons/default/application-octet-stream.png" typeof="foaf:Image" class="media-image" alt="">
but I want to display the file name with a link
when i change the file display
admin/config/media/file-types/manage/default/file-display
i get only the icon pdf
Thank you

Comments

zied.ellouze’s picture

Issue summary: View changes
Dave Reid’s picture

Component: Media WYSIWYG View Mode » Media WYSIWYG
Category: Bug report » Support request
Issue tags: -#media, -#wysiwyg
doostinharrell’s picture

This appears to still be an issue however it is resolved when you save the node a second time. What's strange in my case is that when you initially create a node the media markup looks differently than when you go to edit the node for the 1st and different again the 2nd time.

---

Here is what I'm seeing when I first embed the file (prior to saving)

<p>[[{"fid":"10283","view_mode":"teaser","fields":{"format":"teaser"},"type":"media","field_deltas":{"1":{"format":"teaser"}},"attributes":{"class":"file media-element file-teaser","data-delta":"1"},"link_text":false}]]</p>

Only the file icon is displayed, not icon text, no link.

---

Here is what I'm seeing when I edit the node the 1st time

<p>[[{"fid":"10283","view_mode":"teaser","fields":{"format":"teaser"},"type":"media","field_deltas":{"1":{"format":"teaser"}},"link_text":null,"attributes":{"class":"file media-element file-teaser","data-delta":"1"}}]]</p>

The link works as expected. I see the icon, the text, and everything is wrapped in a link.

---

Here is what I'm seeing when I edit the node a 2nd time

<p>[[{"fid":"10283","view_mode":"teaser","fields":{"format":"teaser"},"type":"media","field_deltas":{"1":{"format":"teaser"}},"link_text":"SampleReqForm.pdf","attributes":{"class":"file media-element file-teaser","data-delta":"1"}}]]</p>

---

Hopefully this sheds some light on the issue.

Chris Matthews’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Status: Active » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team