17488 Posts in 4473 Topics by 1978 members
Page: 1 2
|Go to End||Next >|
24 February 2007 at 10:54pm
Does silverstripe strip out <object></object> tags?
I've been trying to embed a youtube video into a page with little success
I'm trying to get the following markup to show through:
"<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/1fF8WtguWgY"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/pdelp1Pr0tQ" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>"
but instead silverstripe chucks out:
" <em><strong>ERROR:</strong> If you can see this, then <a href="http://www.youtube.com/">YouTube</a> is down or you don't have Flash installed.</em> "
I've even stuck it straight into the 'Sitetree' table record for that page using phpMySQL just in case it was TinyMCE that was causing the problem.
The object tags are in the database record, but silverstripe refuses to let that HTML pass through it's renderer.
Otherwise a great job guys thanks.
1 March 2007 at 3:48am Last edited: 1 March 2007 3:50am
Sorry very busy so you have to google: Go to the tinymce website and look for valid elements in the wiki
Try again if its not a cleanup feature of the tinymce, if you want to change that, you will have to edit the tinymce template file. ( /jsparty/tinymce/ )
I had a similar problem, *
- didnt work in SS
- didnt work in SS
15 December 2007 at 1:04pm Last edited: 15 December 2007 1:05pm
I also could not embed YouTube flash objects in the Silverstripe CMS TinyMCE editor (this is Silverstripe 2.2.0). I tried to enter the code from YouTube, but TinyMCE always changed the code, i.e. it removed the YouTube source URL and added other stuff like pluginspage, codebase, etc ...
verify_html : true,
verify_html : false,
TinyMCE still adds code, but it does not strip the source URL any more.
I did not test if changing verify_html to false has some bad side-effects elsewhere, and also I did not have the chance to test the result on the published page on a system other than a Mac but I will post here if I discover that this causes some problems.
The best solution would be a TinyMCE plugin to add a button for embedded video from external sources such as YouTube, Google Video, etc... There must be such a plugin out there, but I couldn't find a proper one yet.
18 December 2007 at 9:50am
I'm really interested in a clean way of doing this.
There must be some kind of plugin for this, no? Even the wordpress editor has a specific button for it.
I think this is a must for a blog, and I'm already having someone asking to embed YouTube movies and finding them stripped.
Have you found any side-effect of verify_html yet? I don't think I want to change this to false, as it probably doesn't correct html if it's screwed up by none-savvy users in htmlMode?
Core Development Team
18 December 2007 at 12:17pm
A simple solution is just to create a separate 'HTMLText' field, and paste the embed code in it. This was done for another site http://www.start-up.co.nz and it worked well for that.
18 December 2007 at 12:29pm
But wouldn't work in my situation though. It's some kind of blog and there should be the ability to embed the youtube anywhere in the text.
Doing it your way would be a little too limiting I'm afraid.
24 November 2008 at 4:50pm
how would you create it for the blog? Thanks
1 December 2008 at 10:14am Last edited: 1 December 2008 10:16am
Yes how about a workaround for the Blog?
I followed the instruction to turn off the html verification but it only seems to work for the blog entry excerpt then. Not for the entry itself.
Page: 1 2
|Go to Top||Next >|