diff --git a/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js b/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
index 819f130aae..7fac83774b 100644
--- a/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
+++ b/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
@@ -39,6 +39,14 @@
this.execCommand( 'InsertOrderedList' );
} );
+ add( /^>\s/, function() {
+ this.formatter.toggle( 'blockquote' );
+ } );
+
+ add( /^(#{2,6})\s/, function() {
+ this.formatter.toggle( 'h' + arguments[1].length );
+ } );
+
editor.on( 'selectionchange', function() {
canUndo = false;
} );
@@ -84,7 +92,11 @@
}
tinymce.each( patterns, function( pattern ) {
- var replace = text.replace( pattern.regExp, '' );
+ var args,
+ replace = text.replace( pattern.regExp, function() {
+ args = arguments;
+ return '';
+ } );
if ( text === replace ) {
return;
@@ -105,7 +117,7 @@
editor.selection.setCursorLocation( parent );
- pattern.callback.apply( editor );
+ pattern.callback.apply( editor, args );
} );
// We need to wait for native events to be triggered.
diff --git a/wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js b/wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js
index 4f80bce48f..4e5ca356c1 100644
--- a/wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js
+++ b/wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js
@@ -1 +1 @@
-!function(a,b){a.PluginManager.add("wptextpattern",function(c){function d(a,b){f.push({regExp:a,callback:b})}var e=c.$,f=[],g=!1;d(/^[*-]\s/,function(){this.execCommand("InsertUnorderedList")}),d(/^1[.)]\s/,function(){this.execCommand("InsertOrderedList")}),c.on("selectionchange",function(){g=!1}),c.on("keydown",function(b){g&&b.keyCode===a.util.VK.BACKSPACE&&(c.undoManager.undo(),b.preventDefault())}),c.on("keyup",function(d){var h,i,j,k,l;if(d.keyCode===a.util.VK.SPACEBAR&&(h=c.selection.getRng(),i=h.startContainer,i&&3===i.nodeType&&(j=i.nodeValue,k=c.dom.getParent(i,"p")))){for(;(l=k.firstChild)&&3!==l.nodeType;)k=l;l===i&&a.each(f,function(a){var d=j.replace(a.regExp,"");if(j!==d&&h.startOffset===j.length-d.length)return c.undoManager.add(),c.undoManager.transact(function(){d?e(i).replaceWith(document.createTextNode(d)):e(i.parentNode).empty().append("
"),c.selection.setCursorLocation(k),a.callback.apply(c)}),b(function(){g=!0}),!1})}})})}(window.tinymce,window.setTimeout);
\ No newline at end of file
+!function(a,b){a.PluginManager.add("wptextpattern",function(c){function d(a,b){f.push({regExp:a,callback:b})}var e=c.$,f=[],g=!1;d(/^[*-]\s/,function(){this.execCommand("InsertUnorderedList")}),d(/^1[.)]\s/,function(){this.execCommand("InsertOrderedList")}),d(/^>\s/,function(){this.formatter.toggle("blockquote")}),d(/^(#{2,6})\s/,function(){this.formatter.toggle("h"+arguments[1].length)}),c.on("selectionchange",function(){g=!1}),c.on("keydown",function(b){g&&b.keyCode===a.util.VK.BACKSPACE&&(c.undoManager.undo(),b.preventDefault())}),c.on("keyup",function(d){var h,i,j,k,l;if(d.keyCode===a.util.VK.SPACEBAR&&(h=c.selection.getRng(),i=h.startContainer,i&&3===i.nodeType&&(j=i.nodeValue,k=c.dom.getParent(i,"p")))){for(;(l=k.firstChild)&&3!==l.nodeType;)k=l;l===i&&a.each(f,function(a){var d,f=j.replace(a.regExp,function(){return d=arguments,""});if(j!==f&&h.startOffset===j.length-f.length)return c.undoManager.add(),c.undoManager.transact(function(){f?e(i).replaceWith(document.createTextNode(f)):e(i.parentNode).empty().append("
"),c.selection.setCursorLocation(k),a.callback.apply(c,d)}),b(function(){g=!0}),!1})}})})}(window.tinymce,window.setTimeout);
\ No newline at end of file
diff --git a/wp-includes/js/tinymce/wp-tinymce.js.gz b/wp-includes/js/tinymce/wp-tinymce.js.gz
index b36030a387..c1f2820693 100644
Binary files a/wp-includes/js/tinymce/wp-tinymce.js.gz and b/wp-includes/js/tinymce/wp-tinymce.js.gz differ
diff --git a/wp-includes/version.php b/wp-includes/version.php
index a553f1caf9..333fc0e6f6 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
-$wp_version = '4.3-alpha-32794';
+$wp_version = '4.3-alpha-32795';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.