Custom Fields
Re-Envisioned
Support General WYSIWYG Editor Not Working Correctly

  • Creator
    Topic
  • #23716
    Resolved SLG Marketing
    Participant

    I’ve registered a WYSIWYG metabox on a page post type but the visual editor isn’t working. If I swap to the “text” tab, I can type in there and the details are saved, but nothing is shown in the visual editor section.

    Screenshot showing issue

    Here is the code I’m using to register the metaboxes.

    
    $meta_boxes[] = array(
                'title' => 'Pedestal Details',
                'id'=>'pedestal_details',
                'post_types' => 'page',
                'fields' => array(
                    array(
                        'name'=>'Select Image Map',
                        'id'=>'image_map',
                        'type'=>'select',
                        'options'=>array(
                            'test'=> 'Test'
                        )
                    ),
                    array(
                        'name'=>'Hotspot Details',
                        'id'=>'hotspots',
                        'type'=>'group',
                        'clone'=>true,
                        'sort_clone'=>true,
                        'add_button'=>'Add a Hotspot',
                        'fields'=>array(
                            array(
                                'name'=>'Hotspot Title',
                                'id'=>'hotspot_title',
                                'type'=>'text'
                            ),
                            array(
                                'name'=>'Hotspot Content',
                                'id'=>'hotspot_content',
                                'type'=>'wysiwyg'
                            ),
                            array(
                                'name'=>'Hotspot Image',
                                'id'=>'hotspot_image',
                                'type'=>'image_advanced',
                                'multiple'=>false
                            ),
                            array(
                                'name'=>'Hotspot Products',
                                'id'=>'hotspot_products',
                                'type'=>'post',
                                'post_type'=>'product',
                                'clone' => true,
                                'add_button'=>'Add a product'
                            )
                        )
                    ),
                    array(
                        'name'=>'Select a download',
                        'id'=>'pedestal_downloads',
                        'type'=>'post',
                        'post_type'=>'download',
                        'clone' => true
                    )
                )
            );
    

    What have I missed?

Viewing 4 replies - 41 through 44 (of 44 total)
  • Author
    Replies
  • #24083
    Yard
    Participant

    Hi Anh,

    My company is using a framework similar to Laravel but extended with WordPress support. This is the code:

    Metabox::add('post_internal_information', [
                'title'      => __('Interne informatie', config('app.text_domain')),
                'post_types' => ['page', 'person', 'wip'],
                'context'    => 'normal',
                'priority'   => 'high',
                'fields'     => [
                    [
                        'name'  => __('Titel', config('app.text_domain')),
                        'id'    => 'post_information_internal_title',
                        'type'  => 'text',
                    ],
                    [
                        'name'    => __('Interne informatie', config('app.text_domain')),
                        'id'      => 'post_information_internal',
                        'type'    => 'wysiwyg', // this is the metabox currently having the issue
                        'raw'     => true,
                        'desc'    => __('Hier kunt u informatie toevoegen die alleen voor intern gebruik bestemd is.', config('app.text_domain')),
                    ],
                ],
            ]);
    #24185
    JC
    Participant

    Hi Anh,

    today, after an Update to Meta Box AIO (1.13.0), the problem appeared on another website I’m working on … White Text in visual mode, can’t edit content in visual mode.

    Jan

    #24201
    Teia Local Studio
    Participant

    Hi Anh,

    I updated to MB AIO 1.13.0 in my recent site (custom theme) and the problem DID NOT RETURN. Everything IS FINE for me. I think it could be interesting to report.

    Thanks always!
    G.

    #24241
    Yard Digital
    Participant

    The problem Jan (26-01-21) speaks about is still occurring for me as well. The need for a fix is urgent because our customers are using this field regularly.

Viewing 4 replies - 41 through 44 (of 44 total)
  • You must be logged in to reply to this topic.