Changeset 32795
- Timestamp:
- 06/16/2015 01:51:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
r32703 r32795 38 38 add( /^1[.)]\s/, function() { 39 39 this.execCommand( 'InsertOrderedList' ); 40 } ); 41 42 add( /^>\s/, function() { 43 this.formatter.toggle( 'blockquote' ); 44 } ); 45 46 add( /^(#{2,6})\s/, function() { 47 this.formatter.toggle( 'h' + arguments[1].length ); 40 48 } ); 41 49 … … 85 93 86 94 tinymce.each( patterns, function( pattern ) { 87 var replace = text.replace( pattern.regExp, '' ); 95 var args, 96 replace = text.replace( pattern.regExp, function() { 97 args = arguments; 98 return ''; 99 } ); 88 100 89 101 if ( text === replace ) { … … 106 118 editor.selection.setCursorLocation( parent ); 107 119 108 pattern.callback.apply( editor );120 pattern.callback.apply( editor, args ); 109 121 } ); 110 122
Note: See TracChangeset
for help on using the changeset viewer.