Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to add an extra rich text input field (like so, http://wordpress.org/support/topic/how-can-i-use-the-tinymce-editor-for-fields-in-my-custom-post-type)

So just by adding the class class="theEditor", brings up tiny mce for my extra textfield. So far so good, but

1/ how do i add the editor toolbar with the wysiwyg/HTML tabs for the newly created textfield? 2/ As i am using the plugin qTranslate i also like to add the language tabs

Any tips?

regards

share|improve this question
    
for 1/ i just used the meta-box plugin awesome plugin. Still stuck with 2/ –  alex Nov 1 '12 at 15:21

1 Answer 1

Maby you should use the wp_editor instead? Then you have more control of the editor. An example if you have a meta box called "myfield" in the custom post type. If you want a simple editor you can do like this:

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

If you want more control you can enable stuff in the array like this:

$settings = array(
    'wpautop' => true,
    'media_buttons' => false,
    'tinymce' => array(
        'theme_advanced_buttons1' => 'bold,italic,underline,blockquote,|,undo,redo,|,fullscreen',
        'theme_advanced_buttons2' => '',
        'theme_advanced_buttons3' => '',
        'theme_advanced_buttons4' => ''
    ),
    'quicktags' => array(
        'buttons' => 'b,i,ul,ol,li,link,close'
    )
);

echo '<form action="" method="post" target="_blank">';
wp_editor('<p>Some more content</p>', 'myfield', $settings );
echo '<input type="submit" value="Submit" /></form>';
share|improve this answer
    
i am stuck to WP 3.1.4 so i can't use wp_editor :( any other suggestions –  alex Jul 6 '12 at 10:18
    
Okay, out of curiosity, why are you stuck with Wordpress 3.1.4? –  Pontus Abrahamsson Jul 6 '12 at 13:41
    
hmm, thought i already made a comment. About being stuck the hosting still has php 5.1.6 –  alex Jul 13 '12 at 13:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.