function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TixoGroupaliaTixoGroupalia 

ckEditor plugin youtube

Hi!!

 

I am using the ckEditor (http://ckeditor.com/) to insert html code in a rich text and work perfectly. Now I want to insert a video, for this, I have downloaded the youtube plugin for ckeditor. If I add a video, in the HTML code in ckEditor I can see '<p><iframe height="360" src="//www.youtube.com/embed/IcrbM1l_BoI" width="640"></iframe></p>.

 

The problem is when I saved, the iframe disappear and in the rich text only save<p></p> instead of <p><iframe height="360" src="//www.youtube.com/embed/IcrbM1l_BoI" width="640"></iframe></p>.

 

This only happen with the tag <iframe>, this editor work good with other tags like '<span>', 'style', etc.

 

Anybody knows the solution for this?

Best Answer chosen by TixoGroupalia
Ashish_SFDCAshish_SFDC

Hi Tixo, 

 

Check this out, should help: https://github.com/frozeman/MediaEmbed/

 

Regards,

Ashish

All Answers

Ashish_SFDCAshish_SFDC

Hi Tixo, 

 

Use <apex:iframe> for embedding.

<apex:iframe width="420" height="315" src="http://www.youtube.com/embed/2wTE3k0GqTg"/>


For youTube use their embedd URL instead of buffering URL.

 

Regards,

Ashish

TixoGroupaliaTixoGroupalia

Hi Ashish_SFDC!

 

Thanks!, but I want to add the video using ckEditor,because I only need to store the code, I dont need to watch the video in salesforce.

 

 

Ashish_SFDCAshish_SFDC

Hi Tixo, 

 

Check this out, should help: https://github.com/frozeman/MediaEmbed/

 

Regards,

Ashish

This was selected as the best answer