[wp-trac] [WordPress Trac] #36890: TinyMCE: add settings for the wptextpatterns plugin to add or override the default text patterns
WordPress Trac
noreply at wordpress.org
Thu May 19 17:00:16 UTC 2016
#36890: TinyMCE: add settings for the wptextpatterns plugin to add or override the
default text patterns
-------------------------+-----------------------------
Reporter: azaozz | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: TinyMCE | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+-----------------------------
Comment (by azaozz):
36890.patch is almost identical to
https://core.trac.wordpress.org/attachment/ticket/33300/33300.6.patch. It
adds 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/36890#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list