So I have been working on a portfolio theme for my new wordpress driven art site. I wanted to include a tiny_mce editor in the plugin like portfolio section to allow for html text with line spaces treated as intended. However, at first the issues were that there was no consistency in application over the various versions of wordpress.
Then after that there was the issue that the output on the pages was not including the line breaks as it does in posts. I wanted to avoid having to hard code line breaks and paragraphs so I did some searching. In the end it was incredibly simple for wordpress 3.2 +.
Here is the PHP code you place instead of the textarea tag:
wp_editor( $content, $tagid, $settings =
array(
'wpautop'=> true,
'media_buttons' => true,
'textarea_rows' => '15',
'tabindex' => '',
'editor_class' => 'tumble',
'tinymce' => true,
'quicktags' => true,
'theme' => 'advanced',
'remove_linebreaks' => false,
'teeny' => false
) );
To properly call the content you must use a filter to treat it like a post entry so as to maintain the line breaks.
Calling the Content with PHP
echo apply_filters('the_content',$content );

