diff --git a/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js b/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js index 01ca6ac556..819f130aae 100644 --- a/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js @@ -1,9 +1,29 @@ +/** + * Text pattern plugin for TinyMCE + * + * @since 4.3.0 + * + * This plugin can automatically format text patterns as you type. It includes two patterns: + * - Unordered list (`* ` and `- `). + * - Ordered list (`1. ` and `1) `). + * + * If the transformation in unwanted, the user can undo the change by pressing backspace, + * using the undo shortcut, or the undo button in the toolbar. + */ ( function( tinymce, setTimeout ) { tinymce.PluginManager.add( 'wptextpattern', function( editor ) { var $$ = editor.$, patterns = [], canUndo = false; + /** + * Add a pattern to format with a callback. + * + * @since 4.3.0 + * + * @param {RegExp} regExp + * @param {Function} callback + */ function add( regExp, callback ) { patterns.push( { regExp: regExp,