Crocoblock / suggestions

The suggestions for CrocoBlock project
195 stars 78 forks source link

JetEngine: WYSIWYG Meta Field missing functionality #2453

Closed mw-cgn closed 1 year ago

mw-cgn commented 3 years ago

For now the WYSIWYG/TinyMCE Editor in the Meta Field/Meta Boxes of JetEngine doesn't support the full functionality of the Wordpress TinyMCE-Editor.

As far as i can see (i'm trying to expand the functionallity of a woocommerce product page for a client), i can style the text and place images but i'm unable to paste a youtube or vimeo video iframe-link to show up on the product page as a part of this meta field.

When i paste the link in the plain text view (in the visual view the link remains plain text) and switch back to visual everything is fine. I see a preview. But when i hit update, the video is completely gone.

I'm aware of the fact, that this isn't a major issue. For some reason it might be better to prevent clients from overfilling such fields with unneccessary video content, but in acf and pods similar fields have this functionallity so maybe it could be implmented in an upcomming version of JetEngine.

Thanks in advance

CaseFixedWebdesign commented 3 years ago

+1 for a fix for this issue

asiaryckobozenska commented 3 years ago

This might not be a major issue, but deleting the code or text without any previous warning is. I’ve been adding a lot of videos to a client’s website and they are all gone. I now have to try and search again for the links and recall what she wanted to have there, all because the editor doesn’t work as it should. If deleting a link or an iframe code is its “proper” behavior, that it should give a warning upon saving, that it might be gone. Until then this is not a good UI/UX.

+1 for a fix from me as well.

LilaMiaou commented 2 years ago

UP!! I cant' add any iframe, it's really frustrating and we are really limited. It seems there is a filter that cancels automaticaly the embed.

IrishDesigner commented 2 years ago

+1 would be great to have access to this

kyohshii commented 1 year ago

+1 much needed - in my CPT, the iframe disappears in the WYSIWYG field, and that is just extremely limiting

ofmarconi commented 1 year ago

++++1

andressavw commented 1 year ago

++++1

kaskad88 commented 1 year ago

Solution:

Add follow code to the functions.php file of child theme

add_filter( 'wp_kses_allowed_html', function ( $tags, $context ) {

    if ( 'post' === $context ) {
        $tags['iframe'] = array(
            'src'             => true,
            'width'           => true,
            'height'          => true,
            'frameborder'     => true,
            'allow'           => true,
            'allowfullscreen' => true,
            'title'           => true,
        );
    }

    return $tags;
}, 10, 2 );