[wp-trac] [WordPress Trac] #28195: Preview embeds with wpview and auto embed on paste

WordPress Trac noreply at wordpress.org
Fri Jun 6 11:01:06 UTC 2014


#28195: Preview embeds with wpview and auto embed on paste
-------------------------+-------------------------
 Reporter:  avryl        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.0
Component:  Media        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  javascript
-------------------------+-------------------------

Comment (by avryl):

 Okay, let's fix some things here. :)

 28195.2.patch

 1. Created a separate view for the embed shortcode and just links. The
 latter searches for paragraphs with just a link in it and then tries to
 convert them to a non-shortcode view.
 2. On paste, detect if the cursor is currently in an empty P node and only
 then try to convert it to a view.
 3. If oEmbed fails (and returns a link), replace the view with the link.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28195#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list