WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#28532 closed task (blessed) (fixed)

Add edit mode for MCE [embed] previews

Reported by: wonderboymusic Owned by: wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Embeds Keywords: has-patch
Focuses: javascript Cc:

Description

Wouldn't it be killer if you could edit your embeds like you edit other media previews?

Patch incoming.

Attachments (3)

28532.diff (4.8 KB) - added by wonderboymusic 7 years ago.
28532.2.diff (5.1 KB) - added by wonderboymusic 7 years ago.
28532.3.diff (1.3 KB) - added by wonderboymusic 7 years ago.

Download all attachments as: .zip

Change History (11)

@wonderboymusic
7 years ago

#1 @wonderboymusic
7 years ago

.2.diff accounts for the churn from avyrl's patch - both [embed] and URLs are supported for edit.

#2 @wonderboymusic
7 years ago

In 28752:

Add "edit" mode for [embed] and URL media previews.

See #28532.

#3 @wonderboymusic
7 years ago

I created a mixin so that embed and embedURL can share code. I highly suggest trying this feature out, it's pretty slick (pats self on back). Here are some URLs to test with:

http://www.youtube.com/watch?v=ssqvhobab_Q
https://soundcloud.com/disclosuremusic/frontin-pharrell-ft-jay-z-disclosure-re-work

#4 @DrewAPicture
7 years ago

Pretty cool. Probably the only thing left is to embed on paste a la #28195.

http://f.cl.ly/items/153q0C0Q1i2A1o1Z3F22/Screen%20Shot%202014-06-14%20at%2010.05.21%20AM.png

#5 @azaozz
7 years ago

Getting Cannot read property 'edit' of undefined when trying to edit a "plain URL" embed, pointing here: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/js/mce-view.js#L43

#6 @wonderboymusic
7 years ago

type and shortcode mean different things, depending on whether it is a view or view.View. Some things need to refer to type - done in 28532.3.diff

#7 @wonderboymusic
7 years ago

In 28775:

Diambiguate type and shortcode in TinyMCE view classes and their attached view.View class. Has the added feature of not causing JS errors.

See #28532.

#8 @wonderboymusic
7 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 28816:

wp.mce.embedView.fetch() and wp.media.view.EmbedLink.fetch() need to pass the same parameters.

Fixes #28532.

Note: See TracTickets for help on using tickets.