Jump to:

22970 Posts in 11572 Topics by 2823 members

General Questions

SilverStripe Forums » General Questions » html editor striping tags

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: 741 Views
  • Futureweb
    Avatar
    Community Member
    232 Posts

    html editor striping tags Link to this post

    Hi there,
    is there a way to stop the html edittor removing tags it thinks aren't good?

    eg

    <div style="border:2px #999 solid; padding:10px;">
    <div id="fb-root">-</div>
       <fb:like href="http://www.surveystation.info/public-surveys/shopping/why-i-hate-daily-deals-sites/" send="true" width="450" show_faces="true" font="arial"></fb:like>
    </div>

    in this example the editor is removing the FB tag - which is facebooks tag...

    also it removed empty divs, so I have to put a dash or something in there - is there a way for it not remove empty tags?

    Cheers

  • SheaDawson
    Avatar
    Community Member
    45 Posts

    Re: html editor striping tags Link to this post

    I'm not sure if there is an easy way to do that... An alternative you could look into would be to create a shortcode

    See this tutorial http://www.ssbits.com/tutorials/2010/2-4-using-short-codes-to-embed-a-youtube-video/

    Then you would just write something like this into the editor

    [fblike url=http://www.yoursite.com/yourpage]

  • Futureweb
    Avatar
    Community Member
    232 Posts

    Re: html editor striping tags Link to this post

    interesting.
    for now, i did it by just adding the link into a text field in the CMS, and having the rest directly on the page. but the 'shortcode' method below could be more useful, as I could allow for a short code link on any page, and reuse the template.ss to style this are on lots of pages.

    thanks

    741 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.