Jump to:

5522 Posts in 1734 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » How do I insert HTML in Silverstripe?

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

Page: 1
Go to End
Author Topic: 2428 Views
  • salbelle
    Avatar
    Community Member
    6 Posts

    How do I insert HTML in Silverstripe? Link to this post

    Hi there,

    Silverstripe doesn't seem to be able to read and HTML I insert! Is there any way for me to do this or do I kiss HTML goodbye?

    Cheers,
    S.

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: How do I insert HTML in Silverstripe? Link to this post

    Hi!

    Strange question. There’s a big HTML button in the HTML-enabled fields of the CMS, and template files are HTML.

  • salbelle
    Avatar
    Community Member
    6 Posts

    Re: How do I insert HTML in Silverstripe? Link to this post

    Hi,

    Yep I've been trying to use this button in the CMS. Any code I insert into the HTML, Silverstripe won't read and therefore it is not published :/

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: How do I insert HTML in Silverstripe? Link to this post

    It depends what HTML you're trying to insert. It only accepts by default a small subset of elements (divs,links, images, headers etc). You can however customize it to allow what ever you need / want.

    http://doc.silverstripe.org/doku.php?id=htmleditorconfig#customizing_allowed_html

  • brisrocket
    Avatar
    Community Member
    2 Posts

    Re: How do I insert HTML in Silverstripe? Link to this post

    Hi Willr, the link you've suggested a while back is now broken and I can't get this to work. The html I am trying to insert is a SurveyMonkey embed code. I'll try to insert a de-identified copy of the code here:
    <div id="surveyMonkeyInfo"><div><script src="https://www.surveymonkey.com/jsEmbed.aspx?sm=xxxxxxxxxxx"> </script></div>Create your free online surveys with <a href="https://www.surveymonkey.com/">SurveyMonkey</a> , the world's leading questionnaire tool.</div>

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