WordPress.org

Make WordPress Core

Changeset 32703


Ignore:
Timestamp:
06/07/2015 07:59:11 PM (5 years ago)
Author:
iseulde
Message:

TinyMCE: wptextpattern: add docs

Props DrewAPicture and iseulde.
See #31441.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js

    r32700 r32703  
     1/**
     2 * Text pattern plugin for TinyMCE
     3 *
     4 * @since 4.3.0
     5 *
     6 * This plugin can automatically format text patterns as you type. It includes two patterns:
     7 *  - Unordered list (`* ` and `- `).
     8 *  - Ordered list (`1. ` and `1) `).
     9 *
     10 * If the transformation in unwanted, the user can undo the change by pressing backspace,
     11 * using the undo shortcut, or the undo button in the toolbar.
     12 */
    113( function( tinymce, setTimeout ) {
    214    tinymce.PluginManager.add( 'wptextpattern', function( editor ) {
     
    517            canUndo = false;
    618
     19        /**
     20         * Add a pattern to format with a callback.
     21         *
     22         * @since 4.3.0
     23         *
     24         * @param {RegExp}   regExp
     25         * @param {Function} callback
     26         */
    727        function add( regExp, callback ) {
    828            patterns.push( {
Note: See TracChangeset for help on using the changeset viewer.