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

WordPress Trac noreply at wordpress.org
Sun Mar 23 01:19:03 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 miyauchi):

 Replying to [comment:30 azaozz]:

 > 6331.4.diff would make a nice WordPress plugin (that adds the TinyMCE
 plugin) but not sure we want to have another modal just to enter code in
 the default TinyMCE configuration.

 I want to support <code /> and <pre /> in one button.

 This button inserts the <code /> when text is selected.
 And when no text is selected, open modal window and inserts <pre />.

 Of course user can remove <code />, and modify the text in <pre />.

 Do you think about?

 > Also it looks like you've been looking at some old/outdated TinyMCE code
 as `editor.onNodeChange.add()` is the 3.x way to add event handlers. In
 TinyMCE 4.0 that has changed to `editor.on( 'NodeChange', function( event
 ) { ...`.

 fixed.

 Thanks!

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


More information about the wp-trac mailing list