ellatrix / wp-front-end-editor

Front-end Editor for WordPress
https://wordpress.org/plugins/wp-front-end-editor/
340 stars 87 forks source link

Youtube video not shown in FEE #202

Closed Krielkip closed 9 years ago

Krielkip commented 9 years ago

When using the FEE on the content and loading a youtube video, the system breaks and JS gives back that insert is not a node. (mce-view.js) (1.0.0 beta)

In setContent add before if (_.isSting(insert)) {

if (_.isObject(insert)) {
                    $.each( insert, function( key, val ) {
                        if ( key === 'body' ) {
                            insert = val;
                            return;
                        }
                    });
                }

Problem is that the insert of the youtube video is a object and not a string. So there was no element created.

laurgaut commented 9 years ago

I have the same problem in mce-view.js file and your code works fine thank you!! :)

Krielkip commented 9 years ago

@laurgaut No problem. :+1: