[wp-trac] [WordPress Trac] #6331: TinyMCE should have a code button

WordPress Trac noreply at wordpress.org
Mon Mar 24 05:58:35 UTC 2014


#6331: TinyMCE should have a code button
-------------------------+-----------------------
 Reporter:  westi        |       Owner:
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  3.9
Component:  TinyMCE      |     Version:  2.5
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------

Comment (by Denis-de-Bernardy):

 Replying to [comment:32 nacin]:
 > Replying to [comment:26 johnbillion]:
 > > Also, should we add the `wp_code` button into the kitchen sink view?
 >
 > The only reason why I'd want a code button for the visual editor is
 inline code references (like a function name or something). Part of the
 problem with adding a button is block-level handling. If you can select a
 block of text and click the code button, it can't just wrap <code> as
 that's invalid. So you'd need to wrap it in a pre. But you'd probably only
 want that if what's inside the selection is pure unadulterated plain text.
 Otherwise the pre could do some formatting damage.

 If a patch that handles both cases creep in, would you be open to have it
 make it into 3.9?

 As in, when a block is selected, and/remove pre/code, else add/remove
 code.

 D

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


More information about the wp-trac mailing list