Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » HTMLText reformatting and breaking code

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 729 Views
  • SheaDawson
    Avatar
    Community Member
    45 Posts

    HTMLText reformatting and breaking code Link to this post

    Hi,

    I have set up an HTMLText data-type field on a dataobject to hold the embed code for an mp3 player, see example below

    <object data="http://bandcamp.com/EmbeddedPlayer/album=1373743172/size=grande2/bgcol=FFFFFF/linkcol=4285BB//" type="text/html" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="355"><param name="movie" value="http://bandcamp.com/EmbeddedPlayer/album=1373743172/size=grande2/bgcol=FFFFFF/linkcol=4285BB//"><param name="quality" value="high"><param name="allowNetworking" value="always"><param name="wmode" value="transparent"><param name="bgcolor" value="#FFFFFF"><param name="allowScriptAccess" value="never"><object data="http://bandcamp.com/EmbeddedPlayer/album=1373743172/size=grande2/bgcol=FFFFFF/linkcol=4285BB//" type="text/html" width="300" height="355"></object></object>

    The problem is... the HTMLText data-type strips the closing </object> tag off the end upon saving. I'm guessing it thinks it's a mistake and wants to fix it for me... but it actually breaks the site in IE if i don't have that closing tag and also invalidates my mark-up.

    I tried using the "Text" data-type instead of "HTMLText" but then it just spits out the code in text, not a rendered mp3 player.

    Is there a way I can tell HTMLText data-type NOT to modify the code? Or a way to make Text data-type spit out the player rather than the code?

    Thanks in advance

    Shea

    729 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.