Index: wp-includes/class-wp-editor.php
===================================================================
--- wp-includes/class-wp-editor.php	(revision 32551)
+++ wp-includes/class-wp-editor.php	(working copy)
@@ -184,40 +184,13 @@
 			$wrap_class .= ' has-dfw';
 		}
 
-		echo '<div id="wp-' . $editor_id . '-wrap" class="' . $wrap_class . '">';
-
-		if ( self::$editor_buttons_css ) {
-			wp_print_styles('editor-buttons');
-			self::$editor_buttons_css = false;
-		}
-
-		if ( !empty($set['editor_css']) )
-			echo $set['editor_css'] . "\n";
-
 		if ( !empty($buttons) || $set['media_buttons'] ) {
-			echo '<div id="wp-' . $editor_id . '-editor-tools" class="wp-editor-tools hide-if-no-js">';
-
 			if ( $set['media_buttons'] ) {
 				self::$has_medialib = true;
 
 				if ( !function_exists('media_buttons') )
 					include(ABSPATH . 'wp-admin/includes/media.php');
-
-				echo '<div id="wp-' . $editor_id . '-media-buttons" class="wp-media-buttons">';
-
-				/**
-				 * Fires after the default media button(s) are displayed.
-				 *
-				 * @since 2.5.0
-				 *
-				 * @param string $editor_id Unique editor identifier, e.g. 'content'.
-				 */
-				do_action( 'media_buttons', $editor_id );
-				echo "</div>\n";
 			}
-
-			echo '<div class="wp-editor-tabs">' . $buttons . "</div>\n";
-			echo "</div>\n";
 		}
 
 		/**
@@ -227,9 +200,13 @@
 		 *
 		 * @param string $output Editor's HTML markup.
 		 */
-		$the_editor = apply_filters( 'the_editor', '<div id="wp-' . $editor_id . '-editor-container" class="wp-editor-container">' .
-			'<textarea' . $editor_class . $height . $tabindex . $autocomplete . ' cols="40" name="' . $set['textarea_name'] . '" ' .
-			'id="' . $editor_id . '">%s</textarea></div>' );
+		$the_editor = apply_filters(
+			'the_editor',
+			wp_view(
+				'wp-editor.editor-textarea',
+				compact( 'editor_id', 'editor_class', 'height', 'tabindex', 'autocomplete', 'set' )
+			)
+		);
 
 		/**
 		 * Filter the default editor content.
@@ -240,9 +217,23 @@
 		 */
 		$content = apply_filters( 'the_editor_content', $content );
 
-		printf( $the_editor, $content );
-		echo "\n</div>\n\n";
+		echo wp_view('wp-editor.editor', array_merge(
+			compact(
+				'editor_id',
+				'wrap_class',
+				'buttons',
+				'set'
+			),
+			array(
+				'editor_buttons_css' => self::$editor_buttons_css,
+				'content' => sprintf( $the_editor, $content )
+			)
+		));
 
+		if ( self::$editor_buttons_css ) {
+			self::$editor_buttons_css = false;
+		}
+
 		self::editor_settings($editor_id, $set);
 	}
 
Index: wp-includes/views/wp-editor/editor-textarea.php
===================================================================
--- wp-includes/views/wp-editor/editor-textarea.php	(revision 0)
+++ wp-includes/views/wp-editor/editor-textarea.php	(working copy)
@@ -0,0 +1,4 @@
+<div id="wp-<?php echo $editor_id; ?>-editor-container" class="wp-editor-container">
+	<textarea<?php echo $editor_class . $height . $tabindex . $autocomplete; ?> cols="40"
+		name="<?php echo $set['textarea_name']; ?>" id="<?php echo $editor_id; ?>">%s</textarea>
+</div>
Index: wp-includes/views/wp-editor/editor.php
===================================================================
--- wp-includes/views/wp-editor/editor.php	(revision 0)
+++ wp-includes/views/wp-editor/editor.php	(working copy)
@@ -0,0 +1,47 @@
+<div id="wp-<?php echo $editor_id; ?>-wrap" class="<?php echo $wrap_class; ?>">
+
+<?php
+if ( $editor_buttons_css ) {
+	wp_print_styles('editor-buttons');
+}
+
+if ( !empty($set['editor_css']) ) {
+	echo $set['editor_css'] . "\n";
+}
+
+if ( !empty($buttons) || $set['media_buttons'] ) {
+?>
+
+	<div id="wp-<?php echo $editor_id; ?>-editor-tools" class="wp-editor-tools hide-if-no-js">';
+<?php
+	if ( $set['media_buttons'] ) {
+?>
+
+		<div id="wp-<?php echo $editor_id; ?>-media-buttons" class="wp-media-buttons">';
+<?php
+		/**
+		* Fires after the default media button(s) are displayed.
+		*
+		* @since 2.5.0
+		*
+		* @param string $editor_id Unique editor identifier, e.g. 'content'.
+		*/
+		do_action( 'media_buttons', $editor_id );
+?>
+
+		</div>
+<?php
+	}
+?>
+
+		<div class="wp-editor-tabs"><?php echo $buttons; ?></div>
+	</div>
+<?php
+}
+?>
+
+<?php
+	echo $content;
+?>
+
+</div>
Index: wp-includes/views/wp-editor/editor-textarea.php
===================================================================
--- wp-includes/views/wp-editor/editor-textarea.php	(revision 0)
+++ wp-includes/views/wp-editor/editor-textarea.php	(working copy)
@@ -0,0 +1,4 @@
+<div id="wp-<?php echo $editor_id; ?>-editor-container" class="wp-editor-container">
+	<textarea<?php echo $editor_class . $height . $tabindex . $autocomplete; ?> cols="40"
+		name="<?php echo $set['textarea_name']; ?>" id="<?php echo $editor_id; ?>">%s</textarea>
+</div>
Index: wp-includes/views/wp-editor/editor.php
===================================================================
--- wp-includes/views/wp-editor/editor.php	(revision 0)
+++ wp-includes/views/wp-editor/editor.php	(working copy)
@@ -0,0 +1,47 @@
+<div id="wp-<?php echo $editor_id; ?>-wrap" class="<?php echo $wrap_class; ?>">
+
+<?php
+if ( $editor_buttons_css ) {
+	wp_print_styles('editor-buttons');
+}
+
+if ( !empty($set['editor_css']) ) {
+	echo $set['editor_css'] . "\n";
+}
+
+if ( !empty($buttons) || $set['media_buttons'] ) {
+?>
+
+	<div id="wp-<?php echo $editor_id; ?>-editor-tools" class="wp-editor-tools hide-if-no-js">';
+<?php
+	if ( $set['media_buttons'] ) {
+?>
+
+		<div id="wp-<?php echo $editor_id; ?>-media-buttons" class="wp-media-buttons">';
+<?php
+		/**
+		* Fires after the default media button(s) are displayed.
+		*
+		* @since 2.5.0
+		*
+		* @param string $editor_id Unique editor identifier, e.g. 'content'.
+		*/
+		do_action( 'media_buttons', $editor_id );
+?>
+
+		</div>
+<?php
+	}
+?>
+
+		<div class="wp-editor-tabs"><?php echo $buttons; ?></div>
+	</div>
+<?php
+}
+?>
+
+<?php
+	echo $content;
+?>
+
+</div>
Index: wp-includes/views/wp-editor/editor-textarea.php
===================================================================
--- wp-includes/views/wp-editor/editor-textarea.php	(revision 0)
+++ wp-includes/views/wp-editor/editor-textarea.php	(working copy)
@@ -0,0 +1,4 @@
+<div id="wp-<?php echo $editor_id; ?>-editor-container" class="wp-editor-container">
+	<textarea<?php echo $editor_class . $height . $tabindex . $autocomplete; ?> cols="40"
+		name="<?php echo $set['textarea_name']; ?>" id="<?php echo $editor_id; ?>">%s</textarea>
+</div>
Index: wp-includes/views/wp-editor/editor.php
===================================================================
--- wp-includes/views/wp-editor/editor.php	(revision 0)
+++ wp-includes/views/wp-editor/editor.php	(working copy)
@@ -0,0 +1,47 @@
+<div id="wp-<?php echo $editor_id; ?>-wrap" class="<?php echo $wrap_class; ?>">
+
+<?php
+if ( $editor_buttons_css ) {
+	wp_print_styles('editor-buttons');
+}
+
+if ( !empty($set['editor_css']) ) {
+	echo $set['editor_css'] . "\n";
+}
+
+if ( !empty($buttons) || $set['media_buttons'] ) {
+?>
+
+	<div id="wp-<?php echo $editor_id; ?>-editor-tools" class="wp-editor-tools hide-if-no-js">';
+<?php
+	if ( $set['media_buttons'] ) {
+?>
+
+		<div id="wp-<?php echo $editor_id; ?>-media-buttons" class="wp-media-buttons">';
+<?php
+		/**
+		* Fires after the default media button(s) are displayed.
+		*
+		* @since 2.5.0
+		*
+		* @param string $editor_id Unique editor identifier, e.g. 'content'.
+		*/
+		do_action( 'media_buttons', $editor_id );
+?>
+
+		</div>
+<?php
+	}
+?>
+
+		<div class="wp-editor-tabs"><?php echo $buttons; ?></div>
+	</div>
+<?php
+}
+?>
+
+<?php
+	echo $content;
+?>
+
+</div>
