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.

Been looking around for an alternative to this method: http://allcreatives.net/2011/02/02/using-the-native-wordpress-tinymce-wysiwyg-editor-with-your-custom-post-meta-textareas/

To add the WYSIWYG capability to custom metaboxes. You get so little control with this method, is there any other way?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Use this class: http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html

and then call the metabox like this (don't forget to read the manual and view some examples):

$meta_boxes[] = array(
    'id' => 'textmetabox',
    'title' => 'Your Meta Box Title',
    'pages' => array('post', 'slider', 'whatever-your-cpt-is'),

    'fields' => array(
        array(
            'name' => 'Your thoughts about Deluxe Blog Tips',
            'id' => $prefix . 'thoughts',
            'type' => 'wysiwyg',
            'std' => '<b>It\'s great!</b>',
            'desc' => 'Do you think so?',
            'style' => 'width: 300px; height: 400px'
        )
    )
);
share|improve this answer
    
Thanks, works great! Although do you think it's possible to have different sets of button for each WYSIWYG editor? –  INT Jul 2 '11 at 13:24
    
@Daniel Sachs and INT , I'm using the same script and looking into adding different buttons to each WYSIWYG editor that appear on the same page. Do you know if it's possible? :) thanks –  dashaluna Sep 16 '11 at 12:27

The above meta box script is no longer working in WP 3.2. The WYSIWYG editor is display in white background and the buttons are all gone!

Anyone has solution for this problem in 3.2 ?

share|improve this answer
    
Firstly, do not answer questions with a question. You should create a new question since this question specifically is for 3.1 –  INT Jul 6 '11 at 8:46
    
Check out 22599 for info on 3.2 WYSIWYG changes. –  Ian Dunn Aug 2 '11 at 23:40

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.