[wp-trac] [WordPress Trac] #28195: Preview embeds with wpview and auto embed on paste
WordPress Trac
noreply at wordpress.org
Fri May 9 18:29:51 UTC 2014
#28195: Preview embeds with wpview and auto embed on paste
-------------------------+-----------------------------
Reporter: avryl | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
So I've made a patch entirely based on @wonderboymusic's plugin
(http://wordpress.org/plugins/audio-video-bonus-pack/), that has a module
to preview embed shortcodes. The only thing I've added is something that
adds scripts from the embed code to the TinyMCE iframe (I'm sure there are
major concerns...) and something that auto embeds urls. I've just taken
the regex used in class-wp-embed.php, not sure what regex suits this
situation best. The only problem is that it will embed *any* url. Somehow
it should be checked whether the url is embedable, either when
preprocessing the pasted content, or (even better I think) when the
wpviews are created.
Other issues: whenever I paste/undo/redo the views are recreated which
causes the content to flash.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28195>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list