LemonStand Forum: Adding YouTube Videos to Long Description - LemonStand Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Adding YouTube Videos to Long Description

#1 User is offline   StueyJH 

  • Member
  • Group: Members
  • Posts: 24
  • Joined: 28-October 10

Posted 10 January 2012 - 02:35 PM

Hi, I've added an embed iframe from YouTube's web site in the long description by pasting the code in the HTML form, but the site doesn't show the video just the code. The long description editor preview box shows the video though.

Hope you can help.
0

#2 User is offline   EHLOVader 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 246
  • Joined: 05-May 11

Posted 10 January 2012 - 06:56 PM

View PostStueyJH, on 10 January 2012 - 02:35 PM, said:

Hi, I've added an embed iframe from YouTube's web site in the long description by pasting the code in the HTML form, but the site doesn't show the video just the code. The long description editor preview box shows the video though.

Hope you can help.


I have a feeling that the iframe, object or embed elements aren't kept after the save. They aren't considered "safe".

You can add them though, as allowable elements.

Go to the System Settings->HTML Editor Configuration->clean up

You can view it here on the demo site http://demo.lemonsta...fig/#auto_login

Add any tags you are using.. as well as the properties you need. Following the TinyMCE specs http://www.tinymce.c...:valid_elements

It should then work for you.
0

#3 User is offline   Aleksey 

  • Co-Founder
  • Group: +Administrators
  • Posts: 3,631
  • Joined: 31-October 09

Posted 12 January 2012 - 02:48 PM

Hi guys,

Yes, setting Valid Elements in your HTML Editor Settings should work. That's what we use for our blog:

@[id|class|style|title|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value|tabindex|accesskey],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big,audio[autoplay|class|controls|id|lang|loop|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|preload|src|style|title],iframe[src|title|width|height|allowfullscreen|frameborder]

This configuration allows objects and iframes, so we can embed videos to our blog posts: http://lemonstandapp...eature_preview/

Thank you

#4 User is offline   StueyJH 

  • Member
  • Group: Members
  • Posts: 24
  • Joined: 28-October 10

Posted 21 January 2012 - 07:33 AM

View PostAleksey, on 12 January 2012 - 02:48 PM, said:

Hi guys,

Yes, setting Valid Elements in your HTML Editor Settings should work. That's what we use for our blog:

@[id|class|style|title|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value|tabindex|accesskey],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big,audio[autoplay|class|controls|id|lang|loop|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|preload|src|style|title],iframe[src|title|width|height|allowfullscreen|frameborder]

This configuration allows objects and iframes, so we can embed videos to our blog posts: http://lemonstandapp...eature_preview/

Thank you


Thanks for the answers, but anything I add to the long category description even just text, shows up on the category page with HTML tags showing, very strange.
0

#5 User is offline   Aleksey 

  • Co-Founder
  • Group: +Administrators
  • Posts: 3,631
  • Joined: 31-October 09

Posted 22 January 2012 - 03:13 PM

View PostStueyJH, on 21 January 2012 - 07:33 AM, said:

Thanks for the answers, but anything I add to the long category description even just text, shows up on the category page with HTML tags showing, very strange.


Hi!

It suggests that the h() function is applied to the category long description field before it is displayed. It is not needed for HTML fields. Please find the page or partial where you display the category description and remove the h() function call.

Thank you

Share this topic:


Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users