ASPX templates
Version 5.x > ASPX templates > Adding Youtube video in form tab html editor View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
adam - 5/28/2012 7:02:54 AM
   
Adding Youtube video in form tab html editor
Hi

I've added the youtube button to my fckeditor and can select a youtube video but it won't show on the front end. it just outputs the code that is used to generate the inline control! my code is below

 <asp:Literal ID="Content" runat="server"></asp:Literal>

Content.Text =  CMSContext.CurrentDocument.GetValue("Content").ToString();


however if i add an editable region in the .aspx it works.

how can i get this to work in a form tab editable region?

i'm using version 5.5 r2.

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 5/30/2012 8:12:18 AM
   
RE:Adding Youtube video in form tab html editor
Hello.

I am not quite sure what do you mean by “Form tab editable region.” If you have a field in your document type set as Attribute type: Long text, Form control: HTML area (Formatted text), you can use FCKEditor and its dialogs, including inserting YouTube video, even on the Form tab.

Is there any particular reason why you don’t go with this approach? Can you clarify? Thank you.

Best Regards,
Radek Macalik

User avatar
Certified Developer v7
Certified  Developer v7
adam - 5/30/2012 9:37:34 AM
   
RE:Adding Youtube video in form tab html editor
That is what i'm doing and why it is so strange that it doesnt show.

it shows code like "{^YouTubeVideo|(url)http://www.youtube.com/watch?v=k8YDZKTvWMw|(width)425|(height)264|(fs)1|(rel)1^}" instead of rendering the youtube video. any ideas?



User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 5/31/2012 3:02:03 AM
   
RE:Adding Youtube video in form tab html editor
Hello.

The fact that it is transformed to this inline code is OK. This is by design in 5.x version of Kentico CMS (however, it is changed in KCMS 6.0 where it keeps original code format). So, this is not a problem. I added YouTube video in News document (in “News summary” column) and I can see it on the page then, if I display content of that column via <%# Eval("NewsSummary") %>. Did you try it like this?

Best Regards,
Radek Macalik