wyswig editor cutom field in text mode on gutenberg page

Support General wyswig editor cutom field in text mode on gutenberg pageResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28733
    Aaron KesslerAaron Kessler
    Participant

    I noticed some bug reports on the WYSIWYG editor, so I am not 100% sure if this already has been reported.

    I can't edit WYSIWYG content in text mode:
    Error GIF

    I created the following custom field via the visual editor:

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '_akdev_';
    
        $meta_boxes[] = [
            'title'      => __( 'Page Banner', 'your-text-domain' ),
            'id'         => 'page-banner',
            'post_types' => ['page'],
            'include'    => [
                'relation' => 'OR',
                'template' => ['template_page-banner.php'],
            ],
            'validation' => [
                'rules' => [
                    $prefix . '_akdev_cta_text' => [
                        'required' => true,
                    ],
                    $prefix . '_akdev_cta_url'  => [
                        'url' => true,
                    ],
                ],
            ],
            'tabs'       => [
                '_akdev_text_tab' => [
                    'label' => 'Text',
                    'icon'  => 'text',
                ],
                '_akdev_cta_tab'  => [
                    'label' => 'Call to action',
                    'icon'  => 'admin-links',
                ],
            ],
            'fields'     => [
                [
                    'id'   => $prefix . 'banner_text',
                    'type' => 'wysiwyg',
                    'tab'  => '_akdev_text_tab',
                ],
                [
                    'id'     => $prefix . 'banner_cta',
                    'type'   => 'group',
                    'fields' => [
                        [
                            'name'        => __( 'Text', 'your-text-domain' ),
                            'id'          => $prefix . 'cta_text',
                            'type'        => 'text',
                            'placeholder' => __( 'Call to action', 'your-text-domain' ),
                            'required'    => true,
                        ],
                        [
                            'name'        => __( 'Link', 'your-text-domain' ),
                            'id'          => $prefix . 'cta_url',
                            'type'        => 'url',
                            'placeholder' => __( 'https://example.com', 'your-text-domain' ),
                            'required'    => true,
                        ],
                    ],
                    'tab'    => '_akdev_cta_tab',
                ],
            ],
        ];
    
        return $meta_boxes;
    }
    #28735
    Aaron KesslerAaron Kessler
    Participant

    the gif is to fast, this one should visualize it better https://ibb.co/1LD8D2q

    #28743
    Long NguyenLong Nguyen
    Moderator

    Hi,

    I do not see the issue on my local site, screen record https://share.getcloudapp.com/DOuqGL70.

    Please try to switch to the tab Text and re-check this issue.

    #28745
    Aaron KesslerAaron Kessler
    Participant

    That's strange I can't reproduce it. I will reply if the error occurs again.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.