[wp-hackers] WordPress Front-End tinyMCE

Scott Kingsley Clark scott at skcdev.com
Thu Jul 7 16:31:50 UTC 2011


> echo $wp_editor->editor($content, 'whatever', $media_bar);

Oops! Actually I meant to include one more variable before $media_bar
in the function usage. My line above was wrong, see below for the real
code:

<textarea name="whatever" id="whatever" class="whatever"><?php echo
esc_html($content); ?></textarea>
<?php
global $wp_editor;
$media_bar = false; // set to true to show the media bar
$settings = array(); // additional settings, these also pass onto
TinyMCE options, but there are some settings you can tweak
// wpautop: to enable wpautop (default is true)
// wp_buttons_css: location of css;
// editor_class: additional classes to set (default is wp-editor-area)
// upload_link_title: The title of the <a> for the media button(s)
// media_buttons_context: The text to show before the media button(s)
// textarea_rows: how many rows to have on the editor (default is 10)
echo $wp_editor->editor($content, 'whatever', $settings, $media_bar);
?>


More information about the wp-hackers mailing list