How can I configure the WYSYGYG editor options in MB Frontend Submission?

Support MB Frontend Submission How can I configure the WYSYGYG editor options in MB Frontend Submission?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #30523
    FedeFede
    Participant

    I have a CPT which I want to give the possibility to the users to create new entries.

    I use the WYSIWYG field to save the content through these instructions https://docs.metabox.io/save-wysiwyg-content-post-content/

    The thing is that I have no way to configure the editor options, I have tried both this code https://docs.metabox.io/fields/wysiwyg/#sample-code and this other https://pastebin.com/F4QWtfWm but it still appears like this:

    https://prnt.sc/1qw6i4d
    I cannot customize buttons, quicktags ...

    Is there no possibility to customize it?

    #30525
    FedeFede
    Participant

    I can't edit the text above (there were mixed references). This is the other code I have tried:

    https://pastebin.com/F4QWtfWm

    #30534
    FedeFede
    Participant

    This is the code I am using and it does not work to customize the editor for the fake content field:

    public function ks_editor_trabajo_realizado($meta_boxes)
        {
            $post_id = filter_input(INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT);
            $post_content = get_post_field('post_content', $post_id);
    
            $meta_boxes[] = [
                'title'      => 'Descripción del trabajo',
                'post_types' => 'trabajo-realizado',
                'fields'     => [
                    [
                        'type' => 'wysiwyg',
                        'id'   => 'content',
                        'name' => 'Descripción',
                        'std'  => $post_content,
                        'save_field' => false,
                        'options' => [
                            'textarea_rows'   => 3,
                            'media_buttons'    => false,
                            'teeny' => false,
                            'quicktags' => false,
                            'tinymce' => [
                                'media_buttons'    => false,
                            ]
                        ]
                    ],
                ],
            ];
    
            return $meta_boxes;
        }

    Any help please?

    #30546
    Long NguyenLong Nguyen
    Moderator

    Hi,

    FYI, the settings under tinymce are applied to the Visual tab. The settings under quicktags are applied to the Text or HTML tab.

    'fields'     => [
        [
            'type' => 'wysiwyg',
            'id'   => 'content123',
            'name' => 'Descripción',
            'save_field' => false,
            'options' => [
                'textarea_rows'   => 3,
                'media_buttons'    => false,
                'teeny' => false,
                'quicktags' => [
                    'buttons' => 'strong,em,u,link,ul,ol,li',
                ],
                'tinymce' => [
                    'toolbar1' => 'bold,italic',
                ]
            ]
        ],
    ],

    See my screenshots
    https://share.getcloudapp.com/Wnu0kybY
    https://share.getcloudapp.com/Qwu52L0G

    Read more on the documentation
    https://codex.wordpress.org/TinyMCE
    https://codex.wordpress.org/Quicktags_API

    #42898
    Andrew WheelerAndrew Wheeler
    Participant

    hi. old thread, but looking for an answer to an issue. I'm using the metabox UI and trying to get the following in quicktags.buttons - strong,em,u,link. i get bold, italics, and link correctly, but not <u> underline.

    is it me?

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