Hi
I need to add multiple iframes in my music page. I want it to be done from admin panel. I added these lines clicking edit HTML source of the editor but greater than and less than sign are replaced by </p> <p><. I am newbie to silverstripe. Any help will be appreciated.
Sample Iframes:
<p><iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F4922141&show_artwork=true" /></iframe></p>
<p><iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F9111668&show_artwork=true"></iframe></p>
I had done some research and tried adding these lines in mysite/_config.php
HtmlEditorConfig::get('cms')->setOption('verify_html', 'false');
HtmlEditorConfig::get('cms')->setOption('element_format', 'html');
HtmlEditorConfig::get('cms')->setOption('cleanup', 'false');
Also in mysite/code/Page.php
public function onBeforeWrite() {
$this->Content = preg_replace('|<iframe(.*)/>|Uims', '<iframe\\1> </iframe>', $this->Content);
parent::onBeforeWrite();
}
BUT it didn't worked with me.
Thanks in advance
Sanjeev