[wp-trac] [WordPress Trac] #33300: More text patterns

WordPress Trac noreply at wordpress.org
Sat Mar 19 02:03:45 UTC 2016


#33300: More text patterns
--------------------------------------+-------------------------
 Reporter:  iseulde                   |       Owner:  iseulde
     Type:  task (blessed)            |      Status:  closed
 Priority:  normal                    |   Milestone:  4.5
Component:  TinyMCE                   |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  needs-patch dev-feedback  |     Focuses:  javascript
--------------------------------------+-------------------------

Comment (by azaozz):

 In 33300.6.patch: add editor settings to add or override the default text
 patterns.
 Example:
 {{{
 add_filter( 'tiny_mce_before_init', 'textpatterns_test' );
 function textpatterns_test( $init ) {
         $init['wptextpattern_inline_patterns'] = '{
                 strong: { start: "*", end: "*", format: "bold" },
                 strong2: { start: "**", end: "**", format: "bold" },
                 em: { start: "_", end: "_", format: "italic" }
         }';

         return $init;
 }
 }}}

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


More information about the wp-trac mailing list