When uploading and saving a document through media, it appears in my wysiywg editor window pane with a default "document" image, the name of the file, linked, and a size, like so:

Initial upload

I'm then able to edit the link text:

Renamed pdf

However, when I save the page, my changes are ignored and reset to the default view:

Pdf on page

It looks like this was solved in #1942688: Documents embedded in WYSIWYG get converted to HTML by the editor, but that was before all the massive changes to js/wysiwyg-media.js.

Media version: 7.x-2.x-dev (at commit 042f84f)
WYSIWIG version: 7.x-2.2
TinyMCE version: 3.5.8

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mariacha1’s picture

Issue summary: View changes
mariacha1’s picture

mariacha1’s picture

Status: Active » Closed (duplicate)
mariacha1’s picture

FileSize
11.45 KB
mariacha1’s picture

Issue summary: View changes
mariacha1’s picture

Status: Closed (duplicate) » Needs review
FileSize
621 bytes

Reopening this issue because I found a solution to it as stated in the updated summary. Turns out a bit of the patch from #1942688: Documents embedded in WYSIWYG get converted to HTML by the editor wasn't pushed to the latest changes to the alpha release of 7.x-2.x. Patch attached.

genjohnson’s picture

The patch in #6 applied cleanly against the latest dev (commit 8fe0f7d) and worked for me.

briand44’s picture

Component: Code » Media WYSIWYG
Status: Needs review » Reviewed & tested by the community

The patch in #6 worked for me as well.

aaron’s picture

aaron’s picture

aaron’s picture

Status: Reviewed & tested by the community » Needs work

This patch no longer applies.

The last submitted patch, 6: media-link_title_unsaved-2139461-4.patch, failed testing.

The last submitted patch, 6: media-link_title_unsaved-2139461-4.patch, failed testing.

kaidjohnson’s picture

Status: Needs work » Needs review
FileSize
527 bytes

- Re-rolled against the latest HEAD.
- Simplified code. find('a').html() returns null if no 'a' is found.

bneil’s picture

Re-rolled against the latest HEAD.

bneil’s picture

azinck’s picture

Status: Needs review » Reviewed & tested by the community

#15 applies cleanly for me and works perfectly.

aaron’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.