Index: src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
===================================================================
--- src/wp-includes/js/tinymce/plugins/wordpress/plugin.js	(revision 43848)
+++ src/wp-includes/js/tinymce/plugins/wordpress/plugin.js	(working copy)
@@ -20,41 +20,45 @@
 
 	function toggleToolbars( state ) {
 		var iframe, initial, toolbars,
-			pixels = 0;
+			pixels = 0,
+			classicBlockToolbar = tinymce.$( '.block-library-classic__toolbar' );
 
-		initial = ( state === 'hide' );
+		if ( state === 'hide' ) {
+			initial = true;
+			classicBlockToolbar.addClass( 'hide-advanced-toolbars' );
+		} else if ( classicBlockToolbar.hasClass( 'hide-advanced-toolbars' ) ) {
+			classicBlockToolbar.removeClass( 'hide-advanced-toolbars' );
+			state = 'show';
+		}
 
 		if ( editor.theme.panel ) {
 			toolbars = editor.theme.panel.find('.toolbar:not(.menubar)');
 		}
 
-		if ( ! toolbars || toolbars.length < 2 || ( state === 'hide' && ! toolbars[1].visible() ) ) {
-			return;
+		if ( toolbars && toolbars.length > 1 ) {
+			if ( ! state && toolbars[1].visible() ) {
+				state = 'hide';
+			}
+
+			each( toolbars, function( toolbar, i ) {
+				if ( i > 0 ) {
+					if ( state === 'hide' ) {
+						toolbar.hide();
+						pixels += 30;
+					} else {
+						toolbar.show();
+						pixels -= 30;
+					}
+				}
+			});
 		}
 
-		if ( ! state && toolbars[1].visible() ) {
-			state = 'hide';
+		// Resize editor iframe, not needed for iOS and inline instances.
+		if ( pixels && ! tinymce.Env.iOS && editor.iframeElement ) {
+			DOM.setStyle( editor.iframeElement, 'height', editor.iframeElement.clientHeight + pixels );
 		}
 
-		each( toolbars, function( toolbar, i ) {
-			if ( i > 0 ) {
-				if ( state === 'hide' ) {
-					toolbar.hide();
-					pixels += 30;
-				} else {
-					toolbar.show();
-					pixels -= 30;
-				}
-			}
-		});
-
-		if ( pixels && ! initial ) {
-			// Resize iframe, not needed in iOS
-			if ( ! tinymce.Env.iOS ) {
-				iframe = editor.getContentAreaContainer().firstChild;
-				DOM.setStyle( iframe, 'height', iframe.clientHeight + pixels );
-			}
-
+		if ( ! initial ) {
 			if ( state === 'hide' ) {
 				setUserSetting('hidetb', '0');
 				wpAdvButton && wpAdvButton.active( false );
@@ -426,6 +430,12 @@
 		stateSelector: 'code'
 	});
 
+	editor.addButton( 'wp_add_media', {
+		tooltip: 'Insert Media',
+		icon: 'dashicon dashicons-admin-media',
+		cmd: 'WP_Medialib',
+	} );
+
 	// Menubar
 	// Insert->Add Media
 	if ( wp && wp.media && wp.media.editor ) {
