Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28532 closed task (blessed) (fixed)

Add edit mode for MCE [embed] previews

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


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 10 years ago.
28532.2.diff (5.1 KB) - added by wonderboymusic 10 years ago.
28532.3.diff (1.3 KB) - added by wonderboymusic 10 years ago.

Download all attachments as: .zip

Change History (11)

#1 @wonderboymusic
10 years ago

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

#2 @wonderboymusic
10 years ago

In 28752:

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

See #28532.

#3 @wonderboymusic
10 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:

#4 @DrewAPicture
10 years ago

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

#5 @azaozz
10 years ago

Getting Cannot read property 'edit' of undefined when trying to edit a "plain URL" embed, pointing here:

#6 @wonderboymusic
10 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
10 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
10 years ago

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

In 28816:

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

Fixes #28532.

Note: See TracTickets for help on using tickets.