TinyMCE: wptextpattern: add docs

Props DrewAPicture and iseulde.
See #31441.

Built from https://develop.svn.wordpress.org/trunk@32703


git-svn-id: http://core.svn.wordpress.org/trunk@32673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ella Iseulde Van Dorpe 2015-06-07 20:00:28 +00:00
parent c9dd28908a
commit d74a115e21
2 changed files with 21 additions and 1 deletions

View File

@ -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,

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32702';
$wp_version = '4.3-alpha-32703';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.