Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Embeded video in text block modul

Open kaxigt opened this issue 10 years ago • 22 comments

I'm trying to embed a video via wp media uploader in the text block modul instead of using the specific video modul but it doesn't work. How to fix this?

kaxigt avatar Apr 23 '16 12:04 kaxigt

Hello,

Sorry, I don't know, I am not a WP Editor expert.

Try to switch to text mode add the embed shortcode manually

[embed]https://www.youtube.com/embed/7mMLlg9ZCJM[/embed]

I will inspect this problem later.

ghost avatar Apr 25 '16 09:04 ghost

Also you can switch to text mode and add

<iframe width="560" height="315" src="https://www.youtube.com/embed/SOLOZRVNM8w" frameborder="0" allowfullscreen></iframe>

ghost avatar Apr 25 '16 09:04 ghost

Hello,

Our clients also have complains about this issue. They are trying to insert videos under tab shortcode container and it is not working.

Are there any news about this issue?

pear1 avatar May 25 '16 16:05 pear1

Sorry, no news.

ghost avatar May 25 '16 16:05 ghost

I have tried wp-editor > Add Media > Insert from URL > YouTube link, it throws a js error and the preview is showing endless loading

1476375467997

ghost avatar Oct 13 '16 16:10 ghost

@moldcraft It works for me and I'm not able to reproduce that.

andreiglingeanu avatar Apr 25 '17 12:04 andreiglingeanu

Sooo, am I understand this right you won't do anything about it regardless the complains?

kaxigt avatar Apr 25 '17 12:04 kaxigt

Well it worked on my side. Have you tried it and it fails for you?

andreiglingeanu avatar Apr 25 '17 12:04 andreiglingeanu

Yes I have tried it, and appearently others too without a good result. I tried both on child as parent standard theme.

kaxigt avatar Apr 25 '17 14:04 kaxigt

@andreiglingeanu

Well it worked on my side.

sorry just had to :)

https://varianto25.com/stickers/works-on-my-machine

sorry @kaxigt , im sure it will be looked at

danyj avatar Apr 25 '17 16:04 danyj

@kaxigt Can you please make a short video out of your problem?

andreiglingeanu avatar Apr 25 '17 16:04 andreiglingeanu

Now I have tried again. Embed video doesn't work when upload media in text block. Totally blank.

kaxigt avatar Apr 25 '17 17:04 kaxigt

You mean in frontend?

andreiglingeanu avatar Apr 25 '17 18:04 andreiglingeanu

Is it me or does adding a YouTube url in a text-block still not work?

When adding a link in a text-block the back-end shows the video, when checking front-end, only the url of the video shows up. When putting [embed] tags around it, nothing shows.

warudin avatar Jul 18 '18 10:07 warudin

Have you tried to pass the text block contents through the do_shortcode() function? This is required for the embeds to fire up.

andreiglingeanu avatar Jul 18 '18 11:07 andreiglingeanu

I haven't changed the code in the text-block, so this is what happens, which is the default:

<?php echo do_shortcode( $atts['text'] ); ?>

warudin avatar Jul 18 '18 11:07 warudin

There is definitely some differences in the way these editors are implemented... The editor from the Widgets -> Text works expectedly, it properly inlines the Embed URL:

I'll try to dig this... There must be missing some JS functionality for our editor.

No one of you tried to look this more deeper than just reproducing the issue?

andreiglingeanu avatar Jul 18 '18 12:07 andreiglingeanu

@andreiglingeanu

this is what @warudin said

when checking front-end, only the url of the video shows up.

so it means the do_shortcode frontend does not work , but we need to know if @warudin is talking about builder shortcode or the sidebar

danyj avatar Jul 18 '18 13:07 danyj

I believe he's talking about the builder shortcode. I can reproduce this thing on my side too

andreiglingeanu avatar Jul 18 '18 13:07 andreiglingeanu

Yeah, this is about the text-block shortcode.

When adding a YouTube, SoundCloud, Vimeo link, a preview shows up in the back-end, but on the front-end we're only seeing a url.

warudin avatar Jul 18 '18 13:07 warudin