Update: Things will have to change, TinyMCE 4.0 is in core:

  • New UI and UI API.
  • New theme.
  • Revamped events system/API.
  • Better code quality, readability and build process.
  • Lots of (inline) documentation.
  • And generally many improvements everywhere.

TinyMCE 4.0

  1. Highlights
  2. Demos

Thanks to sushkov, WordPress 3.4 adds support for DFW (Distraction Free Writing) on the front-end. See the example below.

Thanks to the work done by Andrew Ozz et al., adding a front-end editor in WordPress 3.3 is very simple. If you're not into creating your own plugins, head over to wpmu.org, they have a great list of 10 front-end editing plugins.

Syntax:

<br />
wp_editor( $content, $editor_id, $settings = array() );</p>
<p>// default settings<br />
$settings = array(<br />
'wpautop' =&gt; true, // use wpautop?<br />
'media_buttons' =&gt; true, // show insert/upload button(s)<br />
'textarea_name' =&gt; $editor_id, // set the textarea name to something different, square brackets [] can be used here<br />
'textarea_rows' =&gt; get_option('default_post_edit_rows', 10), // rows="..."<br />
'tabindex' =&gt; '',<br />
'editor_css' =&gt; '', // intended for extra styles for both visual and HTML editors buttons, needs to include the &lt;style&gt; tags, can use "scoped".<br />
'editor_class' =&gt; '', // add extra class(es) to the editor textarea<br />
'teeny' =&gt; false, // output the minimal editor config used in Press This<br />
'dfw' =&gt; false, // replace the default fullscreen with DFW (supported on the front-end in WordPress 3.4)<br />
'tinymce' =&gt; true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()<br />
'quicktags' =&gt; true // load Quicktags, can be used to pass settings directly to Quicktags using an array()<br />
);<br />


So the simplest one is:

<br />
echo '&lt;form action="" method="post" target="_blank"&gt;';<br />
wp_editor('&lt;p&gt;Some content&lt;/p&gt;', 'textarea01' );<br />
echo '&lt;input type="submit" value="Submit" /&gt;&lt;/form&gt;'<br />

Want better control?:

<br />
$settings = array(<br />
'wpautop' =&gt; true,<br />
'media_buttons' =&gt; false,<br />
'tinymce' =&gt; array(<br />
'theme_advanced_buttons1' =&gt; 'bold,italic,underline,blockquote,|,undo,redo,|,fullscreen',<br />
'theme_advanced_buttons2' =&gt; '',<br />
'theme_advanced_buttons3' =&gt; '',<br />
'theme_advanced_buttons4' =&gt; ''<br />
),<br />
'quicktags' =&gt; array(<br />
'buttons' =&gt; 'b,i,ul,ol,li,link,close'<br />
)<br />
);</p>
<p>echo '&lt;form action="" method="post" target="_blank"&gt;';<br />
wp_editor('&lt;p&gt;Some more content&lt;/p&gt;', 'textarea02', $settings );<br />
echo '&lt;input type="submit" value="Submit" /&gt;&lt;/form&gt;';<br />

Don't want the quick tags?:

<br />
$settings = array(<br />
'wpautop' =&gt; true,<br />
'media_buttons' =&gt; false,<br />
'tinymce' =&gt; array(<br />
'theme_advanced_buttons1' =&gt; 'bold,italic,underline,blockquote,|,undo,redo,|,fullscreen',<br />
'theme_advanced_buttons2' =&gt; '',<br />
'theme_advanced_buttons3' =&gt; '',<br />
'theme_advanced_buttons4' =&gt; ''<br />
),<br />
'quicktags' =&gt; false<br />
);</p>
<p>echo '&lt;form action="" method="post" target="_blank"&gt;';<br />
wp_editor('&lt;p&gt;Some more content&lt;/p&gt;', 'textarea02', $settings );<br />
echo '&lt;input type="submit" value="Submit" /&gt;&lt;/form&gt;';<br />

Or you can do:

<br />
add_filter( 'teeny_mce_buttons',tinytiny_buttons);</p>
<p>$settings = array("teeny"=&gt;true,'media_buttons' =&gt; false,'quicktags' =&gt; false);</p>
<p>echo '&lt;form action="" method="post" target="_blank"&gt;';<br />
wp_editor('&lt;p&gt;Some more content&lt;/p&gt;', 'textarea04', $settings );<br />
echo '&lt;input type="submit" value="Submit" /&gt;&lt;/form&gt;';</p>
<p>function tinytiny_buttons($buttons) {<br />
return array('bold', 'italic', 'underline', 'blockquote', 'separator', 'undo', 'redo', 'fullscreen');<br />
}<br />


DFW (Distraction Free Writing) demo:

<br />
&lt;?php<br />
/**<br />
* Template Name: DFW Demo Template<br />
* Description: A Page Template that demos DFW front-end editing<br />
*<br />
*/</p>
<p>get_header(); ?&gt;<br />
&lt;div id="primary"&gt;<br />
&lt;div id="content" role="main"&gt;<br />
&lt;?php<br />
wp_editor('DFW demo content', 'dfw_id', array(<br />
'dfw' =&gt; true<br />
));<br />
?&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;?php get_footer(); ?&gt;<br />

Save the code above as dfw-demo.php in your (child) theme folder (tested with the Twenty Eleven template). Create a page, using the DFW Demo Template. Note, you must be running WordPress 3.4.

Notes (from the codex)

Note that the ID that is passed to the wp_editor() function can only be comprised of lower-case letters. No underscores, no hyphens. Anything else will cause the WYSIWYG editor to malfunction.

Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. What this means in practical terms, is that you cannot put it in meta-boxes that can be dragged and placed elsewhere on the page

More information
wp_editor() is located in wp-includes/general-template.php
The default settings are defined in wp-includes/class-wp-editor.php
I've also added several examples in the comments below