[wp-trac] [WordPress Trac] #26628: Use the content of a video shortcode when provided

WordPress Trac noreply at wordpress.org
Wed Jan 15 06:55:48 UTC 2014


#26628: Use the content of a video shortcode when provided
----------------------------+------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  3.9
Component:  Media           |     Version:  3.6
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------

Comment (by azaozz):

 In 26628.3.diff:
 - Set the <div> as a placeholder and make it `contenteditable="false"`. A
 div cannot be a wrapper of a placeholder as the user is able to place the
 caret in it and type. That can break the placeholder and the typed content
 is lost.
 - When setting the shortcode as title, remove the opening `[`. This
 prevents it from being parsed again (while inside the title attribute).
 - Renamed the functions, still may need better naming :)

 TODO:
 - Are the changes to wpautop() really needed (seems it's been working
 without them)? If yes, perhaps it's better to combine stripping of line
 breaks around all elements inside <object>, <audio> and <video>. Also why
 look for the unparsed shortcode there?
 - Using `contenteditable="false"` for the placeholder works well, but the
 user cannot delete it once inserted. This can work perhaps by setting
 "selected" state on click and binding a keyboard shortcut for backspace
 and delete keys.

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


More information about the wp-trac mailing list