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

WordPress Trac noreply at wordpress.org
Thu Jul 17 13:34:21 UTC 2014


#28195: Preview embeds with wpview and auto embed on paste
----------------------------+-------------------------
 Reporter:  avryl           |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  4.0
Component:  Media           |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  needs-testing   |     Focuses:  javascript
----------------------------+-------------------------

Comment (by Looimaster):

 I'm using 4.0-beta1-20140716. Below are a couple of bug reports.

 1. After updating from 4.0-beta1-20140714 to 4.0-beta1-20140716 I can no
 longer paste YouTube links to the back-end editor. An error I get since
 this update:

 {{{
 Uncaught SecurityError: Blocked a frame with origin "http://localhost"
 from accessing
 a frame with origin "https://www.youtube.com".  The frame requesting
 access has a
 protocol of "http", the frame being accessed has a protocol of "https".
 Protocols must match.
 }}}

 2. Like M-BP noticed "Insert from URL" doesn't show previews when Media
 Library window is enabled somewhere else (like front-end). I enable it
 using `wp_enqueue_media()`.

 3. This is probably related to the above issue. Currently, "Insert from
 URL" will output: `<a
 href="https://www.youtube.com/watch?v=xxxxXXXXxxxx">https://www.youtube.com/watch?v=xxxxXXXXxxxx</a>`
 and not `[embed]https://www.youtube.com/watch?v=xxxxXXXXxxxx[/embed]` when
 I use:

 {{{
 wp.media.editor.open();
 var send_to_editor_backup = window.send_to_editor;
 window.send_to_editor = function(output){
         console.log(output);
         window.send_to_editor = send_to_editor_backup;
 };
 }}}

 Is this intended output? I think no because for images it outputs `<img
 src="http://example.com/image.jpg">`.

 4. Minor: Preview of YouTube player stays when I close the Media Library
 window and reopen it while the link is reset to `http://`.

 5. Minor: Shouldn't the title field appear only after there is some link
 specified and after it's been recognized as image or hasn't been
 recognized as oEmbed? Currently it is present there since the beginning
 even if only `http://` is present in the field above it. Someone who may
 want to paste a YouTube link may start by filling the "title" field and
 they'll be surprised that after pasting the YouTube link this field
 disappeared.

 6. Confusing:
  - Paste YouTube URL, the loading indicator appears.
  - The loading indicator disappears, the title field is still there but
 the YouTube preview doesn't appear.
  - After 3 seconds the title field disappears and the YouTube preview
 appears. There is some lag that lasts 3 seconds for me. The loading
 indicator should disappear at the same moment the preview appears.

 7. It's not possible to paste YouTube links in empty paragraphs anymore in
 TinyMCE in 4.0-beta1-20140714 and since 4.0-beta1-20140716 it's not
 possible to paste YouTube links in both empty paragraphs and existing
 paragraphs (because of this `https://` issue).

 8. Clicking on the "edit" icon while YouTube player is in TinyMCE brings
 up the Media Library window but the preview is not there and it never
 loads (4.0-beta1-20140716).

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


More information about the wp-trac mailing list