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 10 replies - 31 through 40 (of 46 total)
  • Author
    Replies
  • #23947
    JC
    Participant

    Thank you Anh,

    second fix works for me but now the first return key will be ignored in Visuell mode. I always have to type it a second time.

    Best,

    Jan

    #23948
    Teia Local Studio
    Participant

    Hej there!

    Updating only the .JS solved my problems with the editor rendering in classic mode!
    Thank you!

    However, updating the .PHP file brings also to me — as reported by JC — the strange bug on VISUAL text input —— the ENTER KEY must be pressed twice to create a paragraph (or CTRL+ENTER twice for line breaks).

    Always thank you, Ahn & Team!
    G.

    #23960
    Anh Tran
    Keymaster

    Hey guys, I've fixed the bug. Hopefully that's the final fix. Please try again and let me know the result!

    #23967
    JC
    Participant

    Hi Anh,

    the fix works for me. Thanks again.

    Jan

    #23969
    SLG Marketing
    Participant

    Hi Anh

    I've tested this morning with your latest commits of wysiwyg.php and wysiwyg.js, and they seem to be working fine. I've also dployed them to our development server which you still have access to if you need to test them yourself.

    When can we expect these fixes to be rolled out to a proper update?

    Thanks for your support on this.

    #23971
    Anh Tran
    Keymaster

    Done! New version is available on the WordPress.org now.

    PS: Can you do me a favor adding a 5-star review on WordPress.org? Thanks in advanced!

    https://wordpress.org/support/plugin/meta-box/reviews/?filter=5

    #23972
    Teia Local Studio
    Participant

    It's all fixed for me too!
    Five stars are not enough, you and MB team deserves 10 stars, in gold!
    Thank you, Ahn!

    Giovani.

    #24048
    Yard
    Participant

    Hi Anh,

    I've a similar problem, when I load the editor I can see the wysiwyg editor but the font-color is set to white? When I switch to the text-editor and back to the visual the iframe is still set to display:none; I use the latest version of the metabox plug-in (3.5.7) and WordPress 5.6

    After loading the editor: https://ibb.co/Wy3ykPk"
    After switch text back to visual: https://ibb.co/HCtWYDh

    Do you know what the problem is?

    #24070
    Anh Tran
    Keymaster

    Can you post the code that registers the meta box?

    #24076
    Gunvor
    Participant

    My problem from post 23787 has been solved! Thanks!

Viewing 10 replies - 31 through 40 (of 46 total)
  • You must be logged in to reply to this topic.