Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

How do I insert HTML in Silverstripe?


Go to End


5 Posts   3888 Views

Avatar
salbelle

Community Member, 6 Posts

29 March 2010 at 3:17pm

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.

Avatar
Juanitou

Community Member, 323 Posts

30 March 2010 at 3:27am

Hi!

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

Avatar
salbelle

Community Member, 6 Posts

30 March 2010 at 10:57am

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 :/

Avatar
Willr

Forum Moderator, 5523 Posts

30 March 2010 at 4:20pm

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

Avatar
brisrocket

Community Member, 2 Posts

31 July 2013 at 4:11pm

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>