mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 22:45:39 +00:00
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:
parent
c9dd28908a
commit
d74a115e21
@ -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,
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user