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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

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

Embedding video


Go to End


11 Posts   11891 Views

Avatar
Bright Eyes David

Community Member, 26 Posts

3 June 2008 at 11:47pm

I need to use the HTML view in TinyMCE to paste in videos from MySpace, YouTube, etc., but the markup gets changed and added and then there are issues with the resultant HTML. How can I stop TinyMCE changing anything to do with embed and object tags?

I've found a couple of threads on it here, but am not having success.

Thanks.

Avatar
Bright Eyes David

Community Member, 26 Posts

4 June 2008 at 10:03pm

No takers? :)

Avatar
Bright Eyes David

Community Member, 26 Posts

5 June 2008 at 11:10pm

Hmm, this is a shame. I was looking forward to using SS for the first time, but it looks like I'll have to use something else that doesn't fiddle with markup in the same way.

Avatar
Willr

Forum Moderator, 5523 Posts

5 June 2008 at 11:15pm

Theres no real way of doing this at the moment. I usually create another plain text box rather then html text then use that to embed the code for videos, js etc. Bit of a plain

Avatar
Bright Eyes David

Community Member, 26 Posts

5 June 2008 at 11:19pm

Thanks.

Though I understand that this won't allow for custom placement in the content area?

Avatar
Willr

Forum Moderator, 5523 Posts

5 June 2008 at 11:34pm

Well you can be very very tricky and do something similar to http://doc.silverstripe.com/doku.php?id=recipes:customising-content-in-your-templates

So you would have 2 fields - the standard content and the new video text field (VideoText).
Then following the idea above do something like this in your Page_Controller class in Page.php (or whatever page type you need the Video)

function Content() {
return str_replace('$InsertMyVideo', $this->VideoText, $this->Content);
}

Then in the Normal text area you would just need to type $InsertMyVideo whereever you want the video to show. Only fault with this master plan is you can only have 1 video defined on each page at a time :P

Avatar
Bright Eyes David

Community Member, 26 Posts

5 June 2008 at 11:36pm

I see. I need to enable the user to use more than one video.

Thanks for clarifying. All the best with development, and maybe I'll come back another time.

Avatar
Bright Eyes David

Community Member, 26 Posts

2 October 2008 at 9:39pm

So I received the recent SilverStripe email which reminded me of how interested I was in this software. Is there now a way to enable HTML such as that for videos to be inserted without interference?

Go to Top